Why isn't the IF portion of this formula working?

sambharris6

New Member
Joined
Mar 22, 2021
Messages
34
Office Version
  1. 365
Platform
  1. Windows
So this is apart of a larger data subset and I'm simplifying it here, why is the IF formula not doing the FALSE? D12:D16 & D25:D33 should be zero, right?


Book1
CDEFGHI
5FORMULASDATA
611a
7a1b
8b1c
9c1d
10d1e
11e
120
130
1402jj
15jj2dd
16dd2ee
172ww
182vv
192
20jj
21dd
22ee
23ww
24vv3ccc
2503ddd
2603rrrr
270
280
290
30ccc
31ddd
32rrrr
330
Sheet1
Cell Formulas
RangeFormula
D7D7=IF(C6=1,INDEX($I:$I,MATCH($C$6,$H:$H,0)),"")
D8D8=IF($C$6=1,INDEX($I:$I,MATCH($C$6,$H:$H,0)+COUNTA(D7:D$7)),"")
D9:D16D9=IF($C$6=1,INDEX($I:$I,MATCH($C$6,$H:$H,0)+COUNTA(D$7:D8)),"")
D20D20=IF($C$19=2,INDEX($I:$I,MATCH($C$19,$H:$H,0)),"")
D21:D33D21=IF($C$19=2,INDEX($I:$I,MATCH($C$19,$H:$H,0)+COUNTA(D$20:D20)),"")
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
why is the IF formula not doing the FALSE?
Because the test at the beginning of the IF statement is always True, not False. For example, the formula in D12 is
=IF($C$6=1,INDEX($I:$I,MATCH($C$6,$H:$H,0)+COUNTA(D$7:D11)),"")

Here, $C$6=1 is True so the True part of the formula is evaluated.
 
Upvote 0
So this is apart of a larger data subset and I'm simplifying it here, why is the IF formula not doing the FALSE? D12:D16 & D25:D33 should be zero, right?


Book1
CDEFGHI
5FORMULASDATA
611a
7a1b
8b1c
9c1d
10d1e
11e
120
130
1402jj
15jj2dd
16dd2ee
172ww
182vv
192
20jj
21dd
22ee
23ww
24vv3ccc
2503ddd
2603rrrr
270
280
290
30ccc
31ddd
32rrrr
330
Sheet1
Cell Formulas
RangeFormula
D7D7=IF(C6=1,INDEX($I:$I,MATCH($C$6,$H:$H,0)),"")
D8D8=IF($C$6=1,INDEX($I:$I,MATCH($C$6,$H:$H,0)+COUNTA(D7:D$7)),"")
D9:D16D9=IF($C$6=1,INDEX($I:$I,MATCH($C$6,$H:$H,0)+COUNTA(D$7:D8)),"")
D20D20=IF($C$19=2,INDEX($I:$I,MATCH($C$19,$H:$H,0)),"")
D21:D33D21=IF($C$19=2,INDEX($I:$I,MATCH($C$19,$H:$H,0)+COUNTA(D$20:D20)),"")
Oops bad post I think I got a solution!
 
Upvote 0
Because the test at the beginning of the IF statement is always True, not False. For example, the formula in D12 is
=IF($C$6=1,INDEX($I:$I,MATCH($C$6,$H:$H,0)+COUNTA(D$7:D11)),"")

Here, $C$6=1 is True so the True part of the formula is evaluated.
Right totally should have took c6 locked it and rolled it against h column.
 
Upvote 0
Can't figure this out, is there a better solution or formula to make this work?
 
Upvote 0
Because the test at the beginning of the IF statement is always True, not False. For example, the formula in D12 is
=IF($C$6=1,INDEX($I:$I,MATCH($C$6,$H:$H,0)+COUNTA(D$7:D11)),"")

Here, $C$6=1 is True so the True part of the formula is evaluated.
Do you have fix for this issue? A formula that would work in this instance? I need it to roll in secession and be blank where its supposed to

Book1
CDEFGHI
5FORMULASDATA
611a
7a1b
8b1c
9c1d
10d1e
11e
120
130
1402jj
15jj2dd
16dd2ee
17ee2ww
18ww2vv
192rrrr
200
210
220
230
2403ccc
25ccc3ddd
26ddd3rrrr
27rrrr
2830
290
300
310
320
330
340
350
Sheet1
Cell Formulas
RangeFormula
D7D7=INDEX($I:$I,MATCH($C$6,$H:$H,0))
D8D8=INDEX($I:$I,MATCH($C$6,$H:$H,0)+COUNTA(D7:D$7))
D9:D18,D20:D35D9=INDEX($I:$I,MATCH($C$6,$H:$H,0)+COUNTA(D$7:D8))
D19D19=INDEX($I:$I,MATCH($C$19,$H:$H,0)+COUNTA(D$7:D18))
 
Upvote 0
Added an OR formula but if the Data moves like the 2 data set then it doesn't pick it up, yellow cell.

Book1
CDEFGHI
5FORMULASDATA
611a
7a1b
8b1c
9c1d
10d1e
11e
12 
13 
14 
15 
16 
17 
18 
192
20 
21dd
22ee
23ww
24vv3ccc
25 3ddd
26 3rrrr
27 
283ccc
29
30
31
32 
33 
34 
35 
36 
37 2jj
38 2dd
39 2ee
402ww
412vv
Sheet1
Cell Formulas
RangeFormula
D7D7=IF(OR($C$6<>H6,$C$6=""),"",INDEX($I:$I,MATCH($C$6,$H:$H,0)))
D8D8=IF(OR($C$6<>H7,$C$6=""),"",INDEX($I:$I,MATCH($C$6,$H:$H,0)+COUNTA(D7:D$7)))
D9:D14D9=IF(OR($C$6<>H8,$C$6=""),"",INDEX($I:$I,MATCH($C$6,$H:$H,0)+COUNTA(D$7:D8)))
D15:D18D15=IF(OR($C$6<>H37,$C$6=""),"",INDEX($I:$I,MATCH($C$6,$H:$H,0)+COUNTA(D$7:D14)))
D20D20=IF(OR($C$19<>H14,$C$19=""),"",INDEX($I:$I,MATCH($C$19,$H:$H,0)))
D21D21=IF(OR($C$19<>H38,$C$19=""),"",INDEX($I:$I,MATCH($C$19,$H:$H,0)+COUNTA(D20:D$20)))
D22:D24D22=IF(OR($C$19<>H39,$C$19=""),"",INDEX($I:$I,MATCH($C$19,$H:$H,0)+COUNTA(D$20:D21)))
D25:D27D25=IF(OR($C$19<>H20,$C$19=""),"",INDEX($I:$I,MATCH($C$19,$H:$H,0)+COUNTA(D$20:D24)))
D28,D32:D39D28=IF(OR($C$28<>H24,$C$28=""),"",INDEX($I:$I,MATCH($C$28,$H:$H,0)))
 
Upvote 0
So this is apart of a larger data subset and I'm simplifying it here, why is the IF formula not doing the FALSE? D12:D16 & D25:D33 should be zero, right?


Book1
CDEFGHI
5FORMULASDATA
611a
7a1b
8b1c
9c1d
10d1e
11e
120
130
1402jj
15jj2dd
16dd2ee
172ww
182vv
192
20jj
21dd
22ee
23ww
24vv3ccc
2503ddd
2603rrrr
270
280
290
30ccc
31ddd
32rrrr
330
Sheet1
Cell Formulas
RangeFormula
D7D7=IF(C6=1,INDEX($I:$I,MATCH($C$6,$H:$H,0)),"")
D8D8=IF($C$6=1,INDEX($I:$I,MATCH($C$6,$H:$H,0)+COUNTA(D7:D$7)),"")
D9:D16D9=IF($C$6=1,INDEX($I:$I,MATCH($C$6,$H:$H,0)+COUNTA(D$7:D8)),"")
D20D20=IF($C$19=2,INDEX($I:$I,MATCH($C$19,$H:$H,0)),"")
D21:D33D21=IF($C$19=2,INDEX($I:$I,MATCH($C$19,$H:$H,0)+COUNTA(D$20:D20)),"")
INDEX($I:$I,AGGREGATE(15,3,($H:$H=$C$6)/($H:$H=$C$6)*ROW($H:$H),ROWS($N$6:N7))) solved it
 
Upvote 0
Solution

Forum statistics

Threads
1,214,833
Messages
6,121,864
Members
449,052
Latest member
Fuddy_Duddy

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