Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() So i've got this forumla "=E3*VLOOKUP(D3,units,2,FALSE)" I'm using a macro to fill a column in a sheet with that forumla, but I need E3 and D3 to change as they would if i autofilled down. So they're looking at the column in the same row as it is. Any ideas? Thanks, Chris -- cbh35711 ------------------------------------------------------------------------ cbh35711's Profile: http://www.excelforum.com/member.php...o&userid=30276 View this thread: http://www.excelforum.com/showthread...hreadid=529267 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
this does what you want. Adjust to match your particulars.
Range("F3:F200").formula = "=E3*VLOOKUP(D3,units,2,FALSE)" -- Regards, Tom Ogilvy "cbh35711" wrote: So i've got this forumla "=E3*VLOOKUP(D3,units,2,FALSE)" I'm using a macro to fill a column in a sheet with that forumla, but I need E3 and D3 to change as they would if i autofilled down. So they're looking at the column in the same row as it is. Any ideas? Thanks, Chris -- cbh35711 ------------------------------------------------------------------------ cbh35711's Profile: http://www.excelforum.com/member.php...o&userid=30276 View this thread: http://www.excelforum.com/showthread...hreadid=529267 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi When using Vba, take advantage of cells(row,column) to do taks like this. I would suggest this code Dim Ix as long, units as range set range=sheets("???").range("????") for Ix = [the first row in the range] to [last row in the range] cells(Ix,??)= cells(Ix,5)*worksheetfunction.vlookup(cells(Ix,4), units,2,0) next Ix -- jordun ------------------------------------------------------------------------ jordun's Profile: http://www.excelforum.com/member.php...o&userid=33118 View this thread: http://www.excelforum.com/showthread...hreadid=529267 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Great Tom Thanks, Chris -- cbh35711 ------------------------------------------------------------------------ cbh35711's Profile: http://www.excelforum.com/member.php...o&userid=30276 View this thread: http://www.excelforum.com/showthread...hreadid=529267 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copying and Pasting VLOOKUP/HLOOKUP Formulas | Excel Discussion (Misc queries) | |||
MACRO COPY/PASTING | Excel Discussion (Misc queries) | |||
macro for pasting | Excel Discussion (Misc queries) | |||
Vlookup and Pasting | Excel Programming | |||
Pasting Macro | Excel Programming |