Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Duplicating rows in multiple worksheets when using vlookup?

Status
Not open for further replies.

jimrawr

MIS
Oct 8, 2005
16
0
0
US
For some reason, this code works when I create a brand new workbook(for testing)... when I use it in the actual one it needs to be implemented into, it doesnt work at all

Sub dupl_cols()
q = "=if(Sheet1!RC<>"""",Sheet1!RC,"""")"
Sheet2.[a:b] = q
'etc
End Sub


When I run this in the workbook thats not working, it opens a box asking for "Duplicate Values" which wants me to open a seperate file... and gives me a #REF error

Any idea why this might be happening?? Can you use this code when the cells you want to duplicate are coming from a vlookup??
 


Hi,

Sheet1!RC is not a valid cell reference.

For instance...
[tt]
Sheet1!R[red]1[/red]C[red]1[/red]
[/tt]
is valid.

Skip,
[sub]
[glasses] [red]Sign above the facsimile apparatus at the music publisher:[/red]
If it ain't baroque...
Don't FAX it![tongue][/sub]
 


well, I was wrong.

The code you posted does work.

Do you have tabs: Sheet1 & Sheet2?

Skip,
[sub]
[glasses] [red]Sign above the facsimile apparatus at the music publisher:[/red]
If it ain't baroque...
Don't FAX it![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top