Reverse Count continuous value

skm_newsletter

New Member
Joined
Sep 18, 2013
Messages
3
Hi All,

I need to reverse count continuous values. See example below
[TABLE="width: 128"]
<colgroup><col width="64" span="2" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64"]ActualYN[/TD]
[TD="width: 64"]Rcount[/TD]
[/TR]
[TR]
[TD]Down[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Down[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Up[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]Up[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Up[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Down[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Down[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Up[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Down[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]Down[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Down[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Up[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD]Up[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]Up[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]Up[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Down[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]Up[/TD]
[TD="align: right"]1[/TD]
[/TR]
</tbody>[/TABLE]

Thanks,
Sanjay
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Hi, you could try this:


Excel 2013
AB
1ActualYNRcount
2Down2
3Down1
4Up3
5Up2
6Up1
7Down2
8Down1
9Up1
10Down3
11Down2
12Down1
13Up4
14Up3
15Up2
16Up1
17Down1
18Up1
Sheet1
Cell Formulas
RangeFormula
B2=IF(A2=A3,B3+1,1)
 
Upvote 0
Hi, you could try this:

Excel 2013
AB
ActualYNRcount
Down
Down
Up
Up
Up
Down
Down
Up
Down
Down
Down
Up
Up
Up
Up
Down
Up

<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: center"]2[/TD]

[TD="bgcolor: #FFFF00, align: right"]2[/TD]

[TD="align: center"]3[/TD]

[TD="align: right"]1[/TD]

[TD="align: center"]4[/TD]

[TD="align: right"]3[/TD]

[TD="align: center"]5[/TD]

[TD="align: right"]2[/TD]

[TD="align: center"]6[/TD]

[TD="align: right"]1[/TD]

[TD="align: center"]7[/TD]

[TD="align: right"]2[/TD]

[TD="align: center"]8[/TD]

[TD="align: right"]1[/TD]

[TD="align: center"]9[/TD]

[TD="align: right"]1[/TD]

[TD="align: center"]10[/TD]

[TD="align: right"]3[/TD]

[TD="align: center"]11[/TD]

[TD="align: right"]2[/TD]

[TD="align: center"]12[/TD]

[TD="align: right"]1[/TD]

[TD="align: center"]13[/TD]

[TD="align: right"]4[/TD]

[TD="align: center"]14[/TD]

[TD="align: right"]3[/TD]

[TD="align: center"]15[/TD]

[TD="align: right"]2[/TD]

[TD="align: center"]16[/TD]

[TD="align: right"]1[/TD]

[TD="align: center"]17[/TD]

[TD="align: right"]1[/TD]

[TD="align: center"]18[/TD]

[TD="align: right"]1[/TD]

</tbody>
Sheet1

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: #DAE7F5"]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]B2[/TH]
[TD="align: left"]=IF(A2=A3,B3+1,1)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

Hi,
This worked. Thank You.

Thanks,
Sanjay
 
Upvote 0

Forum statistics

Threads
1,223,640
Messages
6,173,503
Members
452,517
Latest member
SoerenB

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