Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default VLookup Variable Offset

I want to use a macro to set an active cell to return a value from the 2nd
column of an array called RollLastRecost. If specific row is empty I want no
value to be the result. I have a formula that works if I manually type it
in, and copy it down through the other rows but I want the macro to put the
formula in for each row using ActiveCell.FormulaR1C1. I'm not sure how to
make the B3 cell reference change as the macro moves through the other rows.
This is what I use manually

If(ISNA(VLookup(B3, RollLastRecost,2,False)),"
",VLookUp_(B3,RollLastRecost,2,False))
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 834
Default VLookup Variable Offset

Try

Range("A3").Resize(8).FormulaR1C1 = _
"=IF(ISNA(VLOOKUP(R[]C2,RollLastRecost,2,False)),"""",VLOOKUP(R[3]C2,RollLastRecost,2,False))"


--

HTH

Bob

"Glenda" wrote in message
...
I want to use a macro to set an active cell to return a value from the 2nd
column of an array called RollLastRecost. If specific row is empty I want
no
value to be the result. I have a formula that works if I manually type it
in, and copy it down through the other rows but I want the macro to put
the
formula in for each row using ActiveCell.FormulaR1C1. I'm not sure how to
make the B3 cell reference change as the macro moves through the other
rows.
This is what I use manually

If(ISNA(VLookup(B3, RollLastRecost,2,False)),"
",VLookUp_(B3,RollLastRecost,2,False))



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sum variable range of column entries in offset cell Struggling in Sheffield[_2_] New Users to Excel 2 October 12th 09 09:11 PM
Sum variable range of column entries in offset cell Struggling in Sheffield[_2_] New Users to Excel 5 October 10th 09 05:16 PM
Variable worksheet name in offset Dave T Excel Worksheet Functions 2 January 25th 07 07:41 PM
Transpose? Offset? Variable starting cell Fin Analyst Excel Discussion (Misc queries) 4 April 26th 06 07:48 AM
Offset VLookup [email protected] Excel Worksheet Functions 2 March 30th 06 07:33 PM


All times are GMT +1. The time now is 09:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"