Home |
Search |
Today's Posts |
#1
|
|||
|
|||
=Cell( , )
I cannot get this function to work when using a VLookup.
My formula is =Cell("contents",VLOOKUP(D5,D8:E10,2,0)) where the VLookup returns an A1 or B1 or C1 etc. If I manually input the formula =Cell("contents",A1) then it works fine. But when using the vlookup in the formula I get an error. What is wrong? Thanks for your help. Steven |
#2
|
|||
|
|||
Steven,
The VLOOKUP returns a string, not a cell reference. INDIRECT that value to get what you want =CELL("contents",INDIRECT(VLOOKUP(D5,D8:E10,2,0))) -- HTH RP (remove nothere from the email address if mailing direct) "Steven" wrote in message ... I cannot get this function to work when using a VLookup. My formula is =Cell("contents",VLOOKUP(D5,D8:E10,2,0)) where the VLookup returns an A1 or B1 or C1 etc. If I manually input the formula =Cell("contents",A1) then it works fine. But when using the vlookup in the formula I get an error. What is wrong? Thanks for your help. Steven |
#3
|
|||
|
|||
Sorry, for sure I am missing something, but what is the point of using the
CELL function here? =INDIRECT(VLOOKUP(D5,D8:E10,2,0)) =CELL("contents",INDIRECT(VLOOKUP(D5,D8:E10,2,0))) Shouldn't these return the same? Thanks and regards, KL "Bob Phillips" wrote in message ... Steven, The VLOOKUP returns a string, not a cell reference. INDIRECT that value to get what you want =CELL("contents",INDIRECT(VLOOKUP(D5,D8:E10,2,0))) -- HTH RP (remove nothere from the email address if mailing direct) "Steven" wrote in message ... I cannot get this function to work when using a VLookup. My formula is =Cell("contents",VLOOKUP(D5,D8:E10,2,0)) where the VLookup returns an A1 or B1 or C1 etc. If I manually input the formula =Cell("contents",A1) then it works fine. But when using the vlookup in the formula I get an error. What is wrong? Thanks for your help. Steven |
#4
|
|||
|
|||
I am not sure if you are asking me why use cell here but what I am doing is
using an Add On product to excel that reads in a csv file with many fields. But the program does not want all the fields. Based on the Category I want to update in the program I have to pick certain fields as the csv file is read in. Therefore by using this Cell function I can basically use a drop down to Pick the Category I want to update and based on the cell references next to that category in the VLookup section it will tell the program which columns (ie fields) to read in. Thank you for both or yours help. Steven. |
#5
|
|||
|
|||
"KL" wrote...
Sorry, for sure I am missing something, but what is the point of using the CELL function here? =INDIRECT(VLOOKUP(D5,D8:E10,2,0)) =CELL("contents",INDIRECT(VLOOKUP(D5,D8:E10,2,0)) ) Shouldn't these return the same? .... They do return the same thing, so there's no point to the CELL call. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|