VBA Excel 2007 Question
Closed
thewhistler
Posts
3
Registration date
Sunday July 5, 2009
Status
Member
Last seen
July 7, 2009
-
Jul 6, 2009 at 06:53 AM
Excelguru Posts 261 Registration date Saturday April 11, 2009 Status Member Last seen June 21, 2011 - Jul 7, 2009 at 10:53 PM
Excelguru Posts 261 Registration date Saturday April 11, 2009 Status Member Last seen June 21, 2011 - Jul 7, 2009 at 10:53 PM
Related:
- VBA Excel 2007 Question
- Save as pdf office 2007 - Download - Other
- Number to words in excel formula without vba - Guide
- Vba case like - Guide
- Excel mod apk for pc - Download - Spreadsheets
- How to open vba in excel - Guide
5 responses
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Jul 6, 2009 at 10:29 PM
Jul 6, 2009 at 10:29 PM
your requirement is not clear
you want to copy the activecell for e.g. A5 amd paste it 25 cells down that is A20.
the code should be somethinglike this
you want to copy the activecell for e.g. A5 amd paste it 25 cells down that is A20.
the code should be somethinglike this
activecell.copy activecell.offset(25,0).pastespecial
thewhistler
Posts
3
Registration date
Sunday July 5, 2009
Status
Member
Last seen
July 7, 2009
Jul 7, 2009 at 04:33 AM
Jul 7, 2009 at 04:33 AM
Its fine I have managed to fix it myself :)
Although another problem has developed and cant seem to see the problem.
I am using the index and match combination as follows:
=INDEX(Sheet6!$A$2:$H$81,MATCH(Sheet5!A8,Sheet6!$A$2:$A$81,0),MATCH(Sheet5!$E$7,Sheet6!$A$1:$H$1,0))
yet when the indexed cells are blank it produce N/A# rather than blank.
I have been trying to use the If ISNA in conjunction with the index formula but excel errors saying there are too many arguements. Think I am missing a bracket somewhere but cant see it.
=if(isna(INDEX(Sheet6!$A$2:$H$81,MATCH(Sheet5!A22,Sheet6!$A$2:$A$81,0),MATCH(Sheet5!$D$5,Sheet6!$A$1:$H$1,0)),"",INDEX(Sheet6!$A$2:$H$81,MATCH(Sheet5!A22,Sheet6!$A$2:$A$81,0),MATCH(Sheet5!$D$5,Sheet6!$A$1:$H$1,0))
Although another problem has developed and cant seem to see the problem.
I am using the index and match combination as follows:
=INDEX(Sheet6!$A$2:$H$81,MATCH(Sheet5!A8,Sheet6!$A$2:$A$81,0),MATCH(Sheet5!$E$7,Sheet6!$A$1:$H$1,0))
yet when the indexed cells are blank it produce N/A# rather than blank.
I have been trying to use the If ISNA in conjunction with the index formula but excel errors saying there are too many arguements. Think I am missing a bracket somewhere but cant see it.
=if(isna(INDEX(Sheet6!$A$2:$H$81,MATCH(Sheet5!A22,Sheet6!$A$2:$A$81,0),MATCH(Sheet5!$D$5,Sheet6!$A$1:$H$1,0)),"",INDEX(Sheet6!$A$2:$H$81,MATCH(Sheet5!A22,Sheet6!$A$2:$A$81,0),MATCH(Sheet5!$D$5,Sheet6!$A$1:$H$1,0))
Excelguru
Posts
261
Registration date
Saturday April 11, 2009
Status
Member
Last seen
June 21, 2011
307
Jul 7, 2009 at 04:43 AM
Jul 7, 2009 at 04:43 AM
=IF(ISNA(INDEX(Sheet6!$A$2:$H$81,MATCH(Sheet5!A22,Sheet6!$A$2:$A$81,0),MATCH(Sheet5!$D$5,Sheet6!$A$1:$H$1,0))),"",INDEX(Sheet6!$A$2:$H$81,MATCH(Sheet5!A22,Sheet6!$A$2:$A$81,0),MATCH(Sheet5!$D$5,Sheet6!$A$1:$H$1,0)))
thewhistler
Posts
3
Registration date
Sunday July 5, 2009
Status
Member
Last seen
July 7, 2009
Jul 7, 2009 at 08:28 AM
Jul 7, 2009 at 08:28 AM
Works perfectly knew there was a bracket or 2 missing thanks very much.
Is there any way to copy what is in an active cell then paste it into the find function?
Currently it only seems to work with placing a value within the find function.
Current code is:
ActiveCell.Offset(-27, 0).Range("A1").Select
Selection.Copy
Sheets("Payroll").Select
Cells.Find(What:="Dave", After:=ActiveCell, LookIn:=xlFormulas _
, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
Sheets("Sheet1").Select
ActiveCell.Offset(26, 5).Range("A1").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Payroll").Select
ActiveCell.Offset(0, 2).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Sheet1").Select
Is there any way to copy what is in an active cell then paste it into the find function?
Currently it only seems to work with placing a value within the find function.
Current code is:
ActiveCell.Offset(-27, 0).Range("A1").Select
Selection.Copy
Sheets("Payroll").Select
Cells.Find(What:="Dave", After:=ActiveCell, LookIn:=xlFormulas _
, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
Sheets("Sheet1").Select
ActiveCell.Offset(26, 5).Range("A1").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Payroll").Select
ActiveCell.Offset(0, 2).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Sheet1").Select
Didn't find the answer you are looking for?
Ask a question
Excelguru
Posts
261
Registration date
Saturday April 11, 2009
Status
Member
Last seen
June 21, 2011
307
Jul 7, 2009 at 10:53 PM
Jul 7, 2009 at 10:53 PM
I think you have to change here
What:="Dave",
then try this
What:= activecell.value ,
What:="Dave",
then try this
What:= activecell.value ,