Match The Switch & Grab The Value From A Range

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
1,226
Office Version
  1. 2010
Platform
  1. Windows
  2. Mobile
My Data Range is B2:G9 (contains values) with ‘headers’ in B1:G1 (Non -numeric)

‘switches’ are in B12:G12 which are EITHER 0 OR 1; AND at a time ONLY 1 ‘SWITCH‘ FOR ‘UNIQUE’ HEADER WILL HAVE 0 OR 1

MATCHING SWITCH’ is in I1:L1

Output is required in I2:J9 as:
MATCH THE SWITCH & ‘grab’ the value from B2:G9

How to accomplish?
Thanks in advance.
I am using Excel 2007.
Sheet1

BCDEFGHIJ

<colgroup><col style="FONT-WEIGHT: bold; WIDTH: 30px"><col style="WIDTH: 40px"><col style="WIDTH: 40px"><col style="WIDTH: 40px"><col style="WIDTH: 40px"><col style="WIDTH: 40px"><col style="WIDTH: 40px"><col style="WIDTH: 12px"><col style="WIDTH: 40px"><col style="WIDTH: 40px"></colgroup><tbody>
[TD="bgcolor: #cacaca, align: center"]1[/TD]
[TD="bgcolor: #ffcc00, align: center"]H[/TD]
[TD="bgcolor: #ffcc00, align: center"]L[/TD]
[TD="bgcolor: #ffcc00, align: center"]H[/TD]
[TD="bgcolor: #ffcc00, align: center"]L[/TD]
[TD="bgcolor: #ffcc00, align: center"]H[/TD]
[TD="bgcolor: #ffcc00, align: center"]L[/TD]

[TD="bgcolor: #ffcc00, align: center"]H[/TD]
[TD="bgcolor: #ffcc00, align: center"]L[/TD]

[TD="bgcolor: #cacaca, align: center"]2[/TD]
[TD="align: right"]50[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]70[/TD]
[TD="align: right"]80[/TD]
[TD="align: right"]88[/TD]
[TD="align: right"]99[/TD]

[TD="bgcolor: #ffff00, align: right"]70[/TD]
[TD="bgcolor: #ffff00, align: right"]60[/TD]

[TD="bgcolor: #cacaca, align: center"]3[/TD]

[TD="bgcolor: #cacaca, align: center"]4[/TD]

[TD="bgcolor: #cacaca, align: center"]5[/TD]

[TD="bgcolor: #cacaca, align: center"]6[/TD]

[TD="bgcolor: #cacaca, align: center"]7[/TD]

[TD="bgcolor: #cacaca, align: center"]8[/TD]

[TD="bgcolor: #cacaca, align: center"]9[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]9[/TD]
[TD="align: right"]1[/TD]

[TD="bgcolor: #ffff00, align: right"]5[/TD]
[TD="bgcolor: #ffff00, align: right"]2[/TD]

[TD="bgcolor: #cacaca, align: center"]10[/TD]

[TD="bgcolor: #cacaca, align: center"]11[/TD]

[TD="bgcolor: #cacaca, align: center"]12[/TD]
[TD="align: right"]0[/TD]
[TD="bgcolor: #ffff00, align: right"]1[/TD]
[TD="bgcolor: #ffff00, align: right"]1[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]

</tbody>
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Unique Headers are in I1:J1
Match Unique Headers with switch value equal to 1 and grab the corresponding value
 
Upvote 0
I am using
=IFERROR(INDEX($B2:$G2,MATCH($I$1&1,$B$1:$G$1&$B$12:$G$12,0)),"")

BUT this does not differentiate between H & h.
Can anyone make the formula to 'rely' on EXACT MATCH?
 
Upvote 0
Cross posted

While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.

Please provide all relevant links.
 
Upvote 0
You have asked this question on at least one other site, please post links to the other site(s), rather than a link to this thread.
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
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