J
jay
I am new to micro coding in excel.
I am in need of an IF statement with an Else.
I run a macro that does a search in excel for a number n32455.
If the number is found, I move to a column next
to it and place a 1.
The macro does another search for a number w3444.
If the number is found, I move to a column next
to it and place a 2.
and continue to 54.
Then I do a sort which brings all numbers to the
top of the spreadsheet.
All supposed to be in order 1 to 54.
However, If a number or two are not found, the
sequence is not 1 to 54. There are rows missing.
I then have to insert all of the messing rows to
get 1 to 54.
What I would like to do is use an IF statement if the
search fails to find a number, then I insert a row and number it.
That is a blank inserted row with the next sequence number.
Then an Else statement would continue on with the next search.
I tried to write this the best way I could.
Hope it is enough.
I am in need of an IF statement with an Else.
I run a macro that does a search in excel for a number n32455.
If the number is found, I move to a column next
to it and place a 1.
The macro does another search for a number w3444.
If the number is found, I move to a column next
to it and place a 2.
and continue to 54.
Then I do a sort which brings all numbers to the
top of the spreadsheet.
All supposed to be in order 1 to 54.
However, If a number or two are not found, the
sequence is not 1 to 54. There are rows missing.
I then have to insert all of the messing rows to
get 1 to 54.
What I would like to do is use an IF statement if the
search fails to find a number, then I insert a row and number it.
That is a blank inserted row with the next sequence number.
Then an Else statement would continue on with the next search.
I tried to write this the best way I could.
Hope it is enough.