Home |
Search |
Today's Posts |
#1
|
|||
|
|||
vlookup
hello,
trying to do the following for i = 1 to 3 b=1 .....bunch of other actions =vlookup(##,table,2,0) b=b+1 next i how do I get the formula to use B as the cell reference? my table has this 1 red 2 blue 3 green I want a different colour to be used each time excel goes through the loop. Hope you can help!!! thanks in advance! |
#2
|
|||
|
|||
Application.WorksheetFunction.VLookup(....
"lost!!" wrote in message ... hello, trying to do the following for i = 1 to 3 b=1 ....bunch of other actions =vlookup(##,table,2,0) b=b+1 next i how do I get the formula to use B as the cell reference? my table has this 1 red 2 blue 3 green I want a different colour to be used each time excel goes through the loop. Hope you can help!!! thanks in advance! |
#3
|
|||
|
|||
I get a compile error. Here's how i've typed it in:
Application.WorksheetFunction.vlookup(b,table,2,0) I have also tried: Application.WorksheetFunction.vlookup((b),table,2, 0) Any suggestions? "N Harkawat" wrote: Application.WorksheetFunction.VLookup(.... "lost!!" wrote in message ... hello, trying to do the following for i = 1 to 3 b=1 ....bunch of other actions =vlookup(##,table,2,0) b=b+1 next i how do I get the formula to use B as the cell reference? my table has this 1 red 2 blue 3 green I want a different colour to be used each time excel goes through the loop. Hope you can help!!! thanks in advance! |
#4
|
|||
|
|||
temp = Application.WorksheetFunction.vlookup(b,table,2,0)
"lost!!" wrote in message ... I get a compile error. Here's how i've typed it in: Application.WorksheetFunction.vlookup(b,table,2,0) I have also tried: Application.WorksheetFunction.vlookup((b),table,2, 0) Any suggestions? "N Harkawat" wrote: Application.WorksheetFunction.VLookup(.... "lost!!" wrote in message ... hello, trying to do the following for i = 1 to 3 b=1 ....bunch of other actions =vlookup(##,table,2,0) b=b+1 next i how do I get the formula to use B as the cell reference? my table has this 1 red 2 blue 3 green I want a different colour to be used each time excel goes through the loop. Hope you can help!!! thanks in advance! |
#5
|
|||
|
|||
I'm sorry - not sure if I'm just missing it but it's not taking it.
In case it helps, here's my module exactly: Dim a, b As Integer a = 6 b = 0 For i = 1 To 3 a = a + 2 b = b + 1 Do While ActiveCell.Offset(1, 0) < "" ActiveCell.Offset(1, 0).Select Sheets("sheet3").Select ActiveCell.FormulaR1C1 = "HOM" ActiveCell.Offset(0, 1).Select temp = Application.WorksheetFunction.VLookup(b, incrcov, 2, 0) ActiveCell.Offset(0, 2).Select Loop Next i "N Harkawat" wrote: temp = Application.WorksheetFunction.vlookup(b,table,2,0) "lost!!" wrote in message ... I get a compile error. Here's how i've typed it in: Application.WorksheetFunction.vlookup(b,table,2,0) I have also tried: Application.WorksheetFunction.vlookup((b),table,2, 0) Any suggestions? "N Harkawat" wrote: Application.WorksheetFunction.VLookup(.... "lost!!" wrote in message ... hello, trying to do the following for i = 1 to 3 b=1 ....bunch of other actions =vlookup(##,table,2,0) b=b+1 next i how do I get the formula to use B as the cell reference? my table has this 1 red 2 blue 3 green I want a different colour to be used each time excel goes through the loop. Hope you can help!!! thanks in advance! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Vlookup finds a blank, but returns a zero - HELP! | Excel Discussion (Misc queries) | |||
Vlookup Syntax Error | New Users to Excel | |||
Need help with modifying VLookUp | Excel Discussion (Misc queries) | |||
Using Cell references in VLookUp | Excel Worksheet Functions | |||
vlookup. | Excel Worksheet Functions |