Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.

Get a Professional Answer

Via email, text message, or notification as you wait on our site. Ask follow up questions if you need to.

100% Satisfaction Guarantee

Rate the answer you receive.

Ask Pete Your Own Question

Pete, Computer Expert

Category: Microsoft Office

Satisfied Customers: 15444

Experience: MS Office expert

30970729

Type Your Microsoft Office Question Here...

Pete is online now

Need formula in excel for sequential numbers

This answer was rated:

★★★★★

In the excel sheets I am using, I have one column which (once sorted) will put all data in ascending numerical order. I would like to insert a column next to it which will denote whether the nemerical order has been skipped or repeated(I would need a different response for each one). I beleive it should be an IF formula, but I am having a brain fart. Please help. Thank You, Laura

I am Pete and I'll be happy to assist with your question today.

ITPeter :

There are two ways you can do this:

ITPeter :

You can either put in an additional column, and use the following formula, if your sort column is column A: =IF(A2=(A1+1),"yes","no")

ITPeter :

This will display the word "no" in the check column if the numerical order is skipped or repeated.

ITPeter :

You could also check the data using a second method - by using a conditional format on the sort column to change the background color of the cell if the numerical order is skipped or repeated. This is the method I usually use myself when checking numerical order sequences.

Customer:

This will definitely help and I like the color idea, how do I do that with the same example you gave. Also I would like to differentiate between skipped and repeated.

Customer:

I just tried it and that works perfectly for repeated #'s.....I would like to use a different color for skipped numbers but I'm not sure which conditional format to use for that

Customer:

Or better yet, if a number is XXXXX add an extra row with the missing number (leaving all other columns blank) for me to fill in.

ITPeter :Thanks for your reply. I am mobile right now but will have an answer for you in a few hours when I return to my desk.

ITPeter :

Hello again,

ITPeter :

I have a new formula for you to use: =IF(A2=A1,"Duplicate",IF(A2>(A1+1),"Skipped","OK"))

ITPeter :

This formula will indicate if the numerical order has been skipped, duplicated, or is ok.

ITPeter :

To use different colors to indicate whether the numerical order has been skipped, duplicated, or is ok will require the use of conditional formatting to shade the cell a particular color, depending on the rules set up. You can set up the conditional formatting cells for the first cell, then use the format painter tool to copy the conditional format down the entire column. If you are not familiar with how to set up conditional formatting and are happy to upload your spreadsheet to www.wikisend.com and send me the link, I can add the formatting for you.

Customer:

Can you put in 2 different conditional formats for the same row....for instance I could BOLD ITALIC anything that repeats and Red color for the formula you mentioned on skipping....with that said how do i put in a formula to return a colored cell. I am learning alot and truly appreciate it

ITPeter :

Yes, depending on which version of Excel you have, you can put in at least 3 conditional formats.

ITPeter :

What version of Excel are you using (2003, 2007, 2010)?

Customer:

I believe it is 2007

ITPeter :

Ok, have you used Conditional Formatting before? Are you familiar with how to set it up?

Customer:

I just used it today...never before

Customer:

I somewhat understand the formulas though

ITPeter :

Ok, well when you are putting in the formulas, you will see a Format... button.

ITPeter :

Click this and select what format you would like the cell to use when the result is True, eg. Bold Italic Font, or change the text color or background color.

Customer:

B17 is 11AA00044....... B16 is 11AA00043....the formula is =IF(B17>(B16+1),"skipped","OK"). is not working and I can not figure out how to make it bold OR a color

Customer:

sorry for how that looks

ITPeter :

The formula will only work with numerical entries.

ITPeter :

Those entries are alphanumerical so the formula will not work.

Customer:

Oh, thats good to know...something tells me i need to read up my formulas....I thank you so much for all your help....I definitely learned a great deal.

Pete and 2 other Microsoft Office Specialists are ready to help you