Hello,
I am new to this forum, and I am hoping someone here can help me. I am using Excel 2003, and I can't get it to do exactly what I want using a macro.
I have an excel document that changes over time, and I want to use a macro to update the formatting as the document changes.
For example, if the value of the first to characters in B2 is not the same as the value of the first two characters in B3, I want to underline cells A2, 2, C2, D2, and E2.
I tried using conditional formatting to do this, and I was able to make it underline B2 only, or even underline all of row 2, but I only want it to apply this formatting to the specified cells, and only when the macro is run.
Here is the logic that I think will make this macro work, but I'm not sure how to program it in excel:
--------------
Start
Remove all current underlining in document
x = 2
IF (column B at row x is NOT blank)While (Value of first two characters in column B at row x is NOT EQUAL to the Value of first two characters in column B at row( x + 1))
Underline Cell A at row x
Underline Cell B at row x
Underline Cell C at row x
Underline Cell D at row x
Underline Cell E at row x
X = X +1
End
------------------------
A sample of what this document looks like:
\1
A sampe of the desired output.
\1
I have been doing this process by hand every day and it is time-consuming and inefficient. Thank you for your help!
Bookmarks