Value corresponding to flag cell

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
1,213
Office Version
  1. 2010
Platform
  1. Windows
  2. Mobile
My input data is in Range1
Range1: B2:G12; values are either of +ve or -ve values or zero or null, columns are contiguous.

There is another ‘flag’ range which is below Range 1 i.e. below B2:G12 at B14:G14.
B14:G14 is either of 100 or <>100 with a caveat that at a time, at the most, only one 1 cell of B14:G14 may contain 100

Output range: J2:J12 (for which formula is requested) as detailed below

For J2:J12:
Example for J2:
Formula should look for value 100 in ‘flag’ range B14:G14 & then find its analogous cell’s value in the corresponding row of Range1. Here G2 for row #2 since 100 found in G22.

How to accomplish please?
Sheet2

BCDEFGHIJ
28.008.008.008.008.008.00 8.00
399.001.2528.0028.0041.25-88.00 -88.00
499.0028.0028.0028.0041.25-80.00 -80.00
588.0028.0028.0028.0041.25-80.00 -80.00
628.0028.0028.0028.0041.25-80.00 -80.00
7-100.0020.0020.0020.001.005.00 5.00
81.000.000.000.00-65.0050.00 50.00
9-85.000.000.000.00-65.0050.00 50.00
10
110.000.000.000.000.000.00 0.00
12 0.000.00
13
1400000100

<colgroup><col style="FONT-WEIGHT: bold; WIDTH: 30px"><col style="WIDTH: 51px"><col style="WIDTH: 51px"><col style="WIDTH: 51px"><col style="WIDTH: 51px"><col style="WIDTH: 51px"><col style="WIDTH: 51px"><col style="WIDTH: 5px"><col style="WIDTH: 9px"><col style="WIDTH: 64px"></colgroup><tbody>
</tbody>
 
Last edited:

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
How about
=INDEX(B2:G2,MATCH(100,$B$14:$G$14,0))
 
Upvote 0
How about
=INDEX(B2:G2,MATCH(100,$B$14:$G$14,0))
Mostly works….2 things

Formula should give null “” if null “” found not zero 0
If there is no 100 in either of the B14:G14, then instead of #N/A, null is required
 
Upvote 0
Ok, how about
=IF(ISBLANK(INDEX(B2:G2,MATCH(100,$B$14:$G$14,0))),"",IFERROR(INDEX(B2:G2,MATCH(100,$B$14:$G$14,0)),""))
 
Upvote 0
Ok, how about
=IF(ISBLANK(INDEX(B2:G2,MATCH(100,$B$14:$G$14,0))),"",IFERROR(INDEX(B2:G2,MATCH(100,$B$14:$G$14,0)),""))

Mind blowing speed & efficiency.. great it works..thanks Fluff
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,518
Messages
6,119,988
Members
448,935
Latest member
ijat

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