If two cells in column A and B are the same then count the sequence in column C

WillTempo

New Member
Joined
Mar 10, 2022
Messages
2
Office Version
  1. 365
Platform
  1. MacOS
Hello,

I have looked but cannot find the answer to my question. I need a formula that looks at the data in column H and then at the data in column I, if the data in the two rows are the same it then will count if the numbers are sequential in column K. For example in the attached screen shot, rows 27 and 28 both have the same figures for H and I and the data in I, is sequential so i would like to return a 1 in column K. There could be up to 6 sequential numbers.

Many thanks for any help.
 

Attachments

  • Excel for forumn advice2.jpg
    Excel for forumn advice2.jpg
    136.4 KB · Views: 8

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Welcome to the MrExcel board!

For the future, please consider this so helpers can copy your sample data to test with:
MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.

Is this what you mean?
If not please provide some sample data again and include the expected results (& preferably post it with XL2BB)

22 03 10.xlsm
HIJK
1
226317 
326567 
426637 
551069 
6510391
75103101
860051 
9600421
10600431
11600441
12600451
13
Seq
Cell Formulas
RangeFormula
K2:K12K2=IF(OR(AND(H2=H1,I2=I1,J2=J1+1),AND(H2=H3,I2=I3,J2=J3-1)),1,"")
 
Upvote 0
Solution
Cheers, glad to help. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,214,879
Messages
6,122,065
Members
449,064
Latest member
scottdog129

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