I'm using multiple worksheets in one big spreadsheet to automatically work out job pricing. I need excel to look at the specified stock and decide which of two prices to use.
Stock options are in worksheet B, and column A has either a 'y' or an 'n' as a filter. The prices are in worksheet C, using columns A/B and E/F respectively (first column is a quantity for vlookup to find, second column is the price).
I need to get the formula to look at the stock, then if it's got a y, use the pricing in columns A/B. If it's got an 'n' I want it to use the pricing in E/F.
This is what I'm trying to get working:
=VLOOKUP($A$5,STOCK!$A$1:$B$26,(IF(STOCK!$A:$A,"y(VLOOKUP($B$4,COLOUR_A4!$A:$B,2,FALSE))","n(VLOOKUP ($B$4,COLOUR_A4!$E:$F,2,FALSE))")),FALSE)
But it's just returning a #VALUE! error, and I can't figure out why. Any help would be appreciated - I've been staring at this for ages.
=if(vlookup($a$5,stock!$a$1:$b$26,2,false)="y",vlookup($b$4,colour_a4!$a:$b,2,false),vlookup ($b$4,colour_a4!$e:$f,2,false))
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and a dabbler in Cisco
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
Thanks for that - it's returning a #N/A instead of a #VALUE!, but that's progress - will take another look later today.
you'll only get n/a if no value found that matches what's in either a4 or b4
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and a dabbler in Cisco
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks