IF Function issue to ignore blank rows

ollyhughes1982

Well-known Member
Joined
Nov 27, 2018
Messages
677
Office Version
  1. 365
Platform
  1. MacOS
Hi all,

I have the formula (below), in column BO, that counts streaks of different events. i.e. it counts from 1 upwards, until and event is repeated (in column BH).

=IF(C5="","",IF(COUNTIF(OFFSET(BH5,0-BO4,0):BH5,BH5)>1,ROW(BH5)-SUMPRODUCT(MAX(ROW(OFFSET(BH5,0-BO4,0):BH4)*(OFFSET(BH5,0-BO4,0):BH4=BH5))),BO4+1))

This formula works when there are no blank rows (gaps in column BH). However, I want the formula to be able to cope with the gaps. i.e. Ignore them. See image (below):

Screenshot 2022-02-10 at 01.34.05.png.jpg


The reason for the gaps is that you can volunteer for more than one roll on any given date at each particular venue (e.g. you can be a tail walker and also a car park marshal etc. at the same event on the same day). So, I only want an entry when there is a different event - which is what I have in column BH.

I have entered the data manually as it should be (highlighted in yellow, in BP). i.e. As soon as an event is repeated, the counter resets to 1 and starts counting again, until another repeat is found.

So, essentially, in column BO I want the formula to operate as it is, but just ignoring the gaps, as if they weren’t there.

Any help much appreciated! Thanks in advance,

Olly.
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Hi. No responses to this, so wondering if I might need to include a link to the actual file, for better explanation?
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,552
Members
449,088
Latest member
davidcom

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