0

I was sent an excel document in the following format:

A |  B  |
1 | abc |
  | def |
2 | abc |
  | def |
  | ghi |
3 | abc |
  | def |

So basically I have the first column which contains ordered numbers every couple of rows. I want to insert a row e.g. between 2 and 3, so that the new row will be numbered 3, and the rows below it are updated accordingly i.e. 3 becomes 4, 4 becomes 5 and so on.

I don't really use excel, but I am curious if there is there an easy way of doing this?

1
  • in which language you want to do. Commented May 31, 2012 at 10:49

2 Answers 2

1

In A1, enter the following formula:

=IF(MOD(ROW(A1),2)=1,(ROW(A1)+1)/2,"")

And copy that formula down to the bottom of the range. Each time you insert a new row, you will need to manually copy the formula to the inserted row's first cell.

Sign up to request clarification or add additional context in comments.

Comments

1

Is there a pattern in the b column, to distinguish if you need to jump to the next number? if so use: in cel A2 and further:

=IF(B2 = "abc",A1+1,A1)

With conditional formating, hide the repeating numbers: =A2=A1

1 Comment

The B column contains descriptions, so each row will be different. It was solved above, but thanks for the help! :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.