MODE IF using INDIRECT

brooksc29

Active Member
Joined
Jul 25, 2010
Messages
333
what type of formula would I need to say

If G2:U80 = "FB"
and the cell below FB says "1"
then find the MODE for the cell below "1"

typically the data is arranged like
row 1 FB
row 2 1
row 3 6
row 4 FB
row 5 1
row 6 A
row 7 FB
row 8 1
row 9 6

the data goes across the row from col G:U in the same pattern

thank you very much for your help! this is a confusing project!

for more information on this project I can either email you my work or you can read another thread where I haven't received a response yet.
http://www.mrexcel.com/forum/showthread.php?t=545394
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Just taking up 1 column sample you posted...

Control+shift+enter, not just enter:

=MODE(IF(G1:G7="FB",IF(G2:G8=1,G3:G9)))
 
Upvote 0
OK, what if the data is on the entire sheet from G2:U80 and every 4 rows starting with row 2 contains FB and every 4 rows starting with row 3 contains 1 and every 4 rows starting with row 3 contains the data I need to find the mode for?
 
Upvote 0
OK, what if the data is on the entire sheet from G2:U80 and every 4 rows starting with row 2 contains FB and every 4 rows starting with row 3 contains 1 and every 4 rows starting with row 3 contains the data I need to find the mode for?

Control+shift+enter, not just enter:

=MODE(IF(G2:U78="FB",IF(G3:U79=1,G4:U80)))

Does this help?
 
Upvote 0
well, two issues with that -

1) in this data set there will also be the number 1 in both rows below FB so will that confuse things?

2) will it count blank cells and if so, will the mode most likely be 0 if there are a lot of blank cells?

this is why I thought using indirect to reference the cell directly below FB then the cell 2 directly below FB would be the best way.

I'm not sure how to write it with INDIRECT though.
 
Upvote 0
well, two issues with that -

1) in this data set there will also be the number 1 in both rows below FB so will that confuse things?

No.

2) will it count blank cells and if so, will the mode most likely be 0 if there are a lot of blank cells?

IF would read empty cells as 0. The following adjustment will avoid the consequences of that...

Control+shift+enter, not just enter:

=MODE(IF(G2:U78="FB",IF(G3:U79=1,IF(ISNUMBER(G4:U80),G4:U80))))

this is why I thought using indirect to reference the cell directly below FB then the cell 2 directly below FB would be the best way.

I'm not sure how to write it with INDIRECT though.

I don't think INDIRECT is needed here.
 
Upvote 0
well, i entered {=MODE(IF(G2:U78="FB",IF(G3:U79=1,IF(ISNUMBER(G4:U80),G4:U80))))}

and the result was 0. Unfortunately, there are no zeros for any data entered...

confusing b/c that formula makes complete sense to me...
 
Upvote 0
hmm, I actually think I got it to work... not sure why it wasn't the first time.

I do have an additional question to this formula.

If I need to base the search contingent upon a name in column C - how would I write that in?

say {=MODE(IF(G2:U78="FB",IF(G3:U79=1,IF(ISNUMBER(G4:U80),G4:U80))))} if the name in column C = cell W2
 
Upvote 0
hmm, I actually think I got it to work... not sure why it wasn't the first time.

I do have an additional question to this formula.

If I need to base the search contingent upon a name in column C - how would I write that in?

say {=MODE(IF(G2:U78="FB",IF(G3:U79=1,IF(ISNUMBER(G4:U80),G4:U80))))} if the name in column C = cell W2

Would you post the first 10 rows from C along with the corresponding 10 rows from G?
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,849
Members
452,948
Latest member
UsmanAli786

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