简体   繁体   中英

Using VLOOKUP data to feed into a formula

In my chart, I have a VLOOKUP formula in COLUMN B and COLUMN D to populate the brand and room count . These are reference points for the the returned number formula in COLUMN E. Since COLUMN B and COLUMN D are using VLOOKUP, it doesn't allow the formula in column E to work unless manually entered. Is there a way around this?

Here's the formula for COLUMN B: =VLOOKUP($A2,'SS File 2019Feb13'!$C$1:$DH$4095,3,0)

Here's the formula for COLUMN D: =VLOOKUP($A2,'SS File 2019Feb13'!$C$1:$DH$4095,4,0)

Here's the formula for COLUMN E: =INDEX(AT:AV,MATCH(D2,AK:AK,1)+0,IF(B2="SB",1,IF(B2="CW",2,3)))

解释障碍

数字表

Thanks for your help!

It is difficult to exactly figure out what is going wrong, given that your example does not constitute a MWE (minimum working example), but I suspect that the mistake might have to do with the dataformat that the vlookup formula returns. If the vlookup formula in column D returns a test/sting (ie "180"), rather than 180 formatted as a number, it might cause trouble in your index match formula as that requires numbers.

You could try:

    =INDEX(AT:AV,MATCH(VALUE(D2),AK:AK,1)+0,IF(B2="SB",1,IF(B2="CW",2,3)))

which will try to convert the returned value in D2 into a number (if that is possible). Column B, IMHO, is less likely to be the problem, given that is already a string and gets compared to strings.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM