Index Match or IF Nested Formulas need most efficient Way Formula

daleholden

Board Regular
Joined
Sep 22, 2002
Messages
243
Please, see attached worksheet to explain what I am looking to achieve.

Also, do the headers in Data row have to match the dropdown box?
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Hi,

In cell C2 ... you could have

Code:
=INDEX(Table1[#All],MATCH(Table2[[#This Row],[sku]],Table1[[#All],[sku]],0),MATCH(Table2[[#This Row],[store]],Table1[#Headers],0))

Hope this will help
 
Upvote 0
same idea but a slightly user friendly version, you should adjust the range to suit for more efficient, e.g. Data!A1:E1000, etc

=INDEX(Data!A:E,MATCH($A2,Data!A:A,0),MATCH($B2,Data!$1:$1,0))
 
Upvote 0
HI Alan

That works great but i need to know is it possible to achieve this if the title headers do not match the dropdown?
I know it is a stupid question but Store1 has many headers Eg Store1 Price, Store 1 VAT Excl, Store 1 VAT Owed Store1 FVF, Store1 PP FVF.
So the drop down has many cells pointing at it a recovering data from various Store 1 headers.
I cannot change the dropdown name so is it possible to hardcode $B2 like "Store 1 FVF"
?
 
Upvote 0
HI Alan

That works great but i need to know is it possible to achieve this if the title headers do not match the dropdown?
I know it is a stupid question but Store1 has many headers Eg Store1 Price, Store 1 VAT Excl, Store 1 VAT Owed Store1 FVF, Store1 PP FVF.
So the drop down has many cells pointing at it a recovering data from various Store 1 headers.
I cannot change the dropdown name so is it possible to hardcode $B2 like "Store 1 FVF"
?

do you mean e.g. "Store 1 FVF" or "Store 1 Price" in Sheet 1, you still want to pick the price in the "Store 1" column?
 
Upvote 0
HI

The drop down has to stop the same if possible so when i select Store 1 in my main data sheet Store 1 has 6 different columns which start with Store 1 but appended with FVF , VAT , VAT Excl as do the other store numbers.
SO my selection in the drop down tells other cells to go off to other areas starting with Store 1

Hope that makes sense
 
Upvote 0
is your data sheet looks something like this?


Book1
ABCDEFGHIJ
1Store 1 FVFStore 1 VATStore 1 VAT ExclStore 1 etc1Store 1 etc2Store 1 etc3Store 2 FVFStore 2 VATStore 2 VAT Excl
26789102030405050505050
312345110120130140150150150150150
Data


if so, the drop down menu on the summary sheet needs to match the datasheet titles to work.

if the drop down menu only offer Store 1, Store 2 etc how does excel knows which Store 1 column (price) to pick?

back to your question of course you can replace $B2 with the column title but that will be for every single row!
 
Last edited:
Upvote 0
if the drop down menu doesn't has the full list of the column headers on the datasheet, one option is to clear the existing validation list and create a new one with all the title headers on the datasheet
 
Upvote 0
HI

I think i am struggling to explain it correctly :)

Store 1 feeds 5 other cells that does a different lookup and calculations based on Store 1.

SO this is a current formula i am using =IF(B6="Website",0,IF(B6="eBay",IFERROR(@INDEX('[Anditsgone MASTER eBay and Amazon Sheet.xlsm]AG eBay'!$A:$V,MATCH(A6,'[Anditsgone MASTER eBay and Amazon Sheet.xlsm]AG eBay'!$A:$A,0),13),IF(B6="SC eBay",IFERROR(@INDEX('[Anditsgone MASTER eBay and Amazon Sheet.xlsm]AG eBay'!$A:$V,MATCH(A6,'[Anditsgone MASTER eBay and Amazon Sheet.xlsm]AG eBay'!$A:$A,0),14),*'[Anditsgone MASTER eBay and Amazon Sheet.xlsm]Sales'!$G6)
 
Upvote 0
HI

I think I am struggling to explain it correctly :)

Store 1 feeds 5 other cells that does a different lookup and calculations based on Store 1.

SO this is a current formula i am using =IF(B6="Website",0,IF(B6="eBay",IFERROR @Index('[Anditsgone MASTER eBay and Amazon Sheet.xlsm]AG eBay'!$A:$V,MATCH(A6,'[Anditsgone MASTER eBay and Amazon Sheet.xlsm]AG eBay'!$A:$A,0),13) @Index('[Anditsgone MASTER eBay and Amazon Sheet.xlsm]Own Stock'!$A:$N,MATCH(A6,'[Anditsgone MASTER eBay and Amazon Sheet.xlsm]Own Stock'!$A:$A,0),14)),IF(B6="SC eBay",IFERROR @Index('[Anditsgone MASTER eBay and Amazon Sheet.xlsm]AG eBay'!$A:$V,MATCH(A6,'[Anditsgone MASTER eBay and Amazon Sheet.xlsm]AG eBay'!$A:$A,0),14) @Index('[Anditsgone MASTER eBay and Amazon Sheet.xlsm]Own Stock'!$A:$N,MATCH(A6,'[Anditsgone MASTER eBay and Amazon Sheet.xlsm]Own Stock'!$A:$A,0),14)),IF(B6="Amazon",IFERROR @Index('[Anditsgone MASTER eBay and Amazon Sheet.xlsm]Amazon'!$A:$R,MATCH(A6,'[Anditsgone MASTER eBay and Amazon Sheet.xlsm]Amazon'!$A:$A,0),13) @Index('[Anditsgone MASTER eBay and Amazon Sheet.xlsm]Own Stock'!$A:$U,MATCH(A6,'[Anditsgone MASTER eBay and Amazon Sheet.xlsm]Own Stock'!$A:$A,0),21)))))*'[Anditsgone MASTER eBay and Amazon Sheet.xlsm]Sales'!$G6)

I no longer have two sheets Own Stock or Amazon sheet so I was trying to deconstruct this to remove these two sheets.
At the same time i was trying to see if it was possible to make this more efficent.
But the dropdown list cannot be changed really
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,169
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top