I have a table which is supposed to have a sequential id number at the beginning as in 1,2,3,4,5,6….
HOWEVER, during the export of the data, there appears to have been a bug which pastes two rows on just one row thus breaking the sequence. I am trying to identify these rows by conditonal format and am currently using this formula which is not working:
="IF($A2+1==$A3,TRUE,FALSE)"
# Note the +1 is to account for the header row
I have tried moving the “$” around, but still no cigar.
My other option is to compare the sequence to the row number as in:
="IF($A2+1=ROWS($A1), TRUE, FALSE)
but that hasen’t worked either.
I’m guessing it has to do with
I am trying to conditionally format the column so that I can identify where I need to insert a row and make a copy paste.
Right now, I am trying to use conditional formatting but am failing in this regard. I don’t know how to use VBA so as of now, I would prefer to use the menu before getting into VBA.
Instead of using an IF
formula in the conditional formatting, try this:
=A2+1<>A3
Somewhat crude, but should do what you want (i.e. highlight the cells that break the sequence).
Answer:
If you remove your ==
and your "
, your formulas should work, but as Rocket Donkey put it, your condition will return TRUE
or FALSE
anyway, so you can remove the IF structure altogether.
Tags: excelexcel, sed