Sequence

BingoGeorge

New Member
Joined
Feb 21, 2017
Messages
10
Hi Folks, I am horrible with my "if" statements. I hope I can get some help.

[TABLE="width: 500"]
<tbody>[TR]
[TD]Item[/TD]
[TD]SEQ[/TD]
[TD]ID[/TD]
[TD]ETc[/TD]
[/TR]
[TR]
[TD]Apples[/TD]
[TD]2000[/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Chicken[/TD]
[TD]2000[/TD]
[TD]2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Pears[/TD]
[TD]2001[/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Onions[/TD]
[TD]2002[/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]steak[/TD]
[TD]2002[/TD]
[TD]2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

What I need does it the SEQ numbers to do +1 if the ID shows 1 OR repeat the same SEQ is the number shows 2.

Let me know what you think.
Thanks
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Try this in cell C2 (ID column) and copy down:
Code:
=IF(B2=B1,C1+1,1)

Or if your numbers aren't always in order, use this formula instead:
Code:
=COUNTIF(B$2:B2,B2)
 
Last edited:
Upvote 0
With 2000 in B2, try this in B3

=IF(C3=1,B2+1,B3)

Copied down.


When I try that is says in a error box "Too many circulars references"
When I copy down they are all "0".



so B2 being the start point at 2000. the ID is 1
B3 should also be 2000 since the ID is 2.
B4 should be 2001 since the id is 1.

These numbers vary, but the ID will always be either 1 or 2.

since I keep adding to the list, its possible that the order changes since I might filter another column.

:)
 
Upvote 0
Did you try either of the two solutions I provided?
 
Upvote 0
The first one does not work since B1 is a column header "SEQ", but I modified it to a row down, and still no luck.
It doesn't matter. If your have a title row in row 1, and your data is in columns A, B, and C, then it works. I tested both of my replies and verified it.

My guess is that your structure is different, and you are trying to adjust something and not doing it properly.
If you cannot work, try describing EXACTLY how your sheet is structured. What columns are you using? What row is your first row of actual data in?

=IF(C3=1,B2+1,B3)
give me a much of zeros
That is not either one of my formulas.
 
Upvote 0
OK, I see. I misunderstood your question.
I thought you were trying to populate column C from column B, not column B from column C.
Sorry about that.

Looks like falcondude was able to help you out.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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