Excel 2010: How to have different sequences in a single column.

ppenalba

New Member
Joined
Jul 10, 2013
Messages
4
Hi i am trying to find a way to get different sequences on a single column according to the value on another column to the right of it. for example every time the value of the right column is "1" it adds to a specific sequence, every tiem its "2" it adds to another sequence. how could this be done? Here is an example of what i would want the code to do. I am looking o see if this can be done with excel formulas rather than VBA please if it is possible. Thanks

1000001
2000002
3000003
1000011
1000021
1000031
1000041
2000012
1000051
1000061
3000033
2000022

<colgroup><col><col span="2"></colgroup><tbody>
</tbody>
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Without using VBA, you are going to have use Nest IFs, so something along the lines of:

Code:
=IF(B2=1,1,IF(B2=2,2,IF(B2=3,3,"NOT FOUND")))

Make sense?
 
Upvote 0
Without using VBA, you are going to have use Nest IFs, so something along the lines of:

Code:
=IF(B2=1,1,IF(B2=2,2,IF(B2=3,3,"NOT FOUND")))

Make sense?

This would only give me the numbers "1" "2" or "3" wouldnt it? i want it to have a sort of sequence for each. Each time it reads one i want it to add a number to that specific sequence and display it beside that number.

Do i explain myself?
 
Upvote 0
I do apologize, I did not understand your sequence question, but not sure how that can be done without the use of VBA someone else might be able to shed some light on it.
 
Upvote 0
Assuming the numbers start in cell B1 you can use the following formula:

=B1*100000+COUNTIF(B$1:B1,B1)-1

It will count how many times the value has appeared in the list above the current cell. The key is to lock the starting cell (B$1) and let the end range change.
 
Upvote 0
No problem, the issue you are going to run into is trying to keep a running total of what the sequence is as it goes down the list, where as with VBA, you can use Counters and Arrays to keep track of all that, I am interested to see what someone else might come up with!
 
Upvote 0
Assuming the numbers start in cell B1 you can use the following formula:

=B1*100000+COUNTIF(B$1:B1,B1)-1

It will count how many times the value has appeared in the list above the current cell. The key is to lock the starting cell (B$1) and let the end range change.

Thats great! Didn't think about use'n a CountIF to add the totals...
 
Upvote 0
Assuming the numbers start in cell B1 you can use the following formula:

=B1*100000+COUNTIF(B$1:B1,B1)-1

It will count how many times the value has appeared in the list above the current cell. The key is to lock the starting cell (B$1) and let the end range change.

Thank you very much! this was what i wanted.
 
Upvote 0

Forum statistics

Threads
1,214,429
Messages
6,119,428
Members
448,896
Latest member
MadMarty

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