Value corresponding to flag cell

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
1,226
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

<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>
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]2[/TD]
[TD="align: right"]8.00[/TD]
[TD="align: right"]8.00[/TD]
[TD="align: right"]8.00[/TD]
[TD="align: right"]8.00[/TD]
[TD="align: right"]8.00[/TD]
[TD="align: right"]8.00[/TD]

[TD="align: right"]8.00[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]3[/TD]
[TD="align: right"]99.00[/TD]
[TD="align: right"]1.25[/TD]
[TD="align: right"]28.00[/TD]
[TD="align: right"]28.00[/TD]
[TD="align: right"]41.25[/TD]
[TD="align: right"]-88.00[/TD]

[TD="align: right"]-88.00[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]4[/TD]
[TD="align: right"]99.00[/TD]
[TD="align: right"]28.00[/TD]
[TD="align: right"]28.00[/TD]
[TD="align: right"]28.00[/TD]
[TD="align: right"]41.25[/TD]
[TD="align: right"]-80.00[/TD]

[TD="align: right"]-80.00[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]5[/TD]
[TD="align: right"]88.00[/TD]
[TD="align: right"]28.00[/TD]
[TD="align: right"]28.00[/TD]
[TD="align: right"]28.00[/TD]
[TD="align: right"]41.25[/TD]
[TD="align: right"]-80.00[/TD]

[TD="align: right"]-80.00[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]6[/TD]
[TD="align: right"]28.00[/TD]
[TD="align: right"]28.00[/TD]
[TD="align: right"]28.00[/TD]
[TD="align: right"]28.00[/TD]
[TD="align: right"]41.25[/TD]
[TD="align: right"]-80.00[/TD]

[TD="align: right"]-80.00[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]7[/TD]
[TD="align: right"]-100.00[/TD]
[TD="align: right"]20.00[/TD]
[TD="align: right"]20.00[/TD]
[TD="align: right"]20.00[/TD]
[TD="align: right"]1.00[/TD]
[TD="align: right"]5.00[/TD]

[TD="align: right"]5.00[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]8[/TD]
[TD="align: right"]1.00[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"]-65.00[/TD]
[TD="align: right"]50.00[/TD]

[TD="align: right"]50.00[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]9[/TD]
[TD="align: right"]-85.00[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"]-65.00[/TD]
[TD="align: right"]50.00[/TD]

[TD="align: right"]50.00[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]10[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]11[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"]0.00[/TD]

[TD="align: right"]0.00[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]12[/TD]

[TD="align: right"]0.00[/TD]
[TD="align: right"]0.00[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]13[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]14[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=ccccff]#ccccff[/URL] , align: center"]0[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=ccccff]#ccccff[/URL] , align: center"]0[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=ccccff]#ccccff[/URL] , align: center"]0[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=ccccff]#ccccff[/URL] , align: center"]0[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=ccccff]#ccccff[/URL] , align: center"]0[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=ccccff]#ccccff[/URL] , align: center"]100[/TD]

</tbody>
 
Last edited:

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
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,223,894
Messages
6,175,250
Members
452,623
Latest member
Techenthusiast

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