1 2 sequence

andrichara

New Member
Joined
Jan 13, 2019
Messages
14
hi to all, i have in G:G a constant values of 1 and 2 and does not change ,is fixed.at F:F there are random variable values of 1 and 2 .what i need is a formula at E1 which counts if for example like workbook attached:if F1 =G1 count 0,if F2=G2 count 0,F3=G3 count 0, F4<>G4 count 1, if F5<>G5 count2,if F6<>G6 count 3 ..and so on ,at F7=G& count zero.I hope i explain well.thanks so much!!
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
at F:F is changing values of 1 and 2 that comes from a random generator,so always look the last value and if is equal with the opposite G:G cell, which is fixed count 1 if is equal count zero
 
Upvote 0
Hi,

If you can have a Blank or Header row use I2 formula copied down, otherwise use E1 formula copied down:


Book1
EFGHI
1011
20220
31211
40220
50110
62122
70110
83123
94214
100220
115215
120220
130110
140220
150110
166126
Sheet612
Cell Formulas
RangeFormula
E1=IF(F1=G1,0,SUMPRODUCT(--(F$1:F1<>G$1:G1)))
I2=IF(F2=G2,0,MAX(I$1:I1)+1)
 
Upvote 0

Forum statistics

Threads
1,213,549
Messages
6,114,261
Members
448,558
Latest member
aivin

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