Dynamic Row Counting with duplicate data

Wrekin

New Member
Joined
Jan 31, 2022
Messages
3
Office Version
  1. 2010
Platform
  1. Windows
Hi All,

I have a query relating to a formula that has been giving me a problem.

What I need is the column 'Review Number' to return a repeatable sequential count based upon the Date (Col B) and ID Number (Col D) entries, in other words the first ID 1234 (never to be duplicated again) has four entries, is the first ID Number checked and is therefore the Review Number (Col C) should return '1'. Likewise the second ID 5678 has three entries, is the second ID Number checked and is therefore Review Number '2' and so on upto Review Number '5', and a new Date is reached here the whole process of numbering from 1 should start again.

In column A I have the formula =countif($B$4:$B4,B4) this returns a sequential number which starts at 1 again once ROW 20 is reach (change of Date). I tried to adopt the same type of formula but just can't get it to work.

So please can anybody help with the formula in 'Review Number' Col B, TIA.

Dynamic Row.jpg
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Welcome to the MrExcel forum!

Try this in C3 and drag down:

Excel Formula:
=IF(AND(B3=B2,D3=D2),C2,SUM(C2,1))
 
Upvote 0
Welcome to the MrExcel forum!

Try this in C3 and drag down:

Excel Formula:
=IF(AND(B3=B2,D3=D2),C2,SUM(C2,1))
Thanks for the input Eric, the formula partly works. The remaining issue is that the 'Review Number' needs to start at '1' again once the Date changes in Col B (Pretty much how the formula works in Col A).

New uploaded image shows your formula in Col C, working perfect upto Row 20.

Formulas shown in Col F & G, for info. Col E is the original 'Review Number' as text.
 

Attachments

  • Dynamic Row 2.jpg
    Dynamic Row 2.jpg
    236.2 KB · Views: 10
Upvote 0
Try this:

Book1 (version 1).xlsb
ABCDE
2Date Sequence NumberDateReview NumberID NumberOriginal Example Number
3
4112/1/2021112341
5212/1/2021112341
6312/1/2021112341
7412/1/2021112341
8512/1/2021256782
9612/1/2021256782
10712/1/2021256782
11812/1/20213ABCD3
12912/1/20213ABCD3
131012/1/20213ABCD3
141112/1/20213ABCD3
151212/1/20214EFGH4
161312/1/20214EFGH4
171412/1/20214EFGH4
181512/1/20215IJKL5
191612/1/20215IJKL5
2011/1/20221A43211
2121/1/20221A43211
2231/1/20221A43211
2341/1/20221A43211
2451/1/20222B56782
2561/1/20222B56782
2671/1/20223C9ABC3
2781/1/20223C9ABC3
2891/1/20223C9ABC3
29101/1/20224DEFGH94
Sheet10
Cell Formulas
RangeFormula
C4:C29C4=IF(B4<>B3,1,IF(D4<>D3,SUM(C3,1),C3))
 
Upvote 0
Try this:

Book1 (version 1).xlsb
ABCDE
2Date Sequence NumberDateReview NumberID NumberOriginal Example Number
3
4112/1/2021112341
5212/1/2021112341
6312/1/2021112341
7412/1/2021112341
8512/1/2021256782
9612/1/2021256782
10712/1/2021256782
11812/1/20213ABCD3
12912/1/20213ABCD3
131012/1/20213ABCD3
141112/1/20213ABCD3
151212/1/20214EFGH4
161312/1/20214EFGH4
171412/1/20214EFGH4
181512/1/20215IJKL5
191612/1/20215IJKL5
2011/1/20221A43211
2121/1/20221A43211
2231/1/20221A43211
2341/1/20221A43211
2451/1/20222B56782
2561/1/20222B56782
2671/1/20223C9ABC3
2781/1/20223C9ABC3
2891/1/20223C9ABC3
29101/1/20224DEFGH94
Sheet10
Cell Formulas
RangeFormula
C4:C29C4=IF(B4<>B3,1,IF(D4<>D3,SUM(C3,1),C3))
Eric, you are a super star many thanks ;)
 
Upvote 0

Forum statistics

Threads
1,215,039
Messages
6,122,799
Members
449,095
Latest member
m_smith_solihull

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