Macro comparing two columns

Closed
RoundOrange Posts 1 Registration date Monday May 25, 2009 Status Member Last seen May 26, 2009 - May 26, 2009 at 03:58 PM
mubashir aziz Posts 190 Registration date Sunday April 12, 2009 Status Member Last seen February 16, 2010 - May 28, 2009 at 04:43 AM
Hello,
I am trying to compare two entire columns in excel, Column A and Column B. If any cell in column A= Lead and any corresponding cell in column B is > .01 – I would like for the numbers in the corresponding column B to turn red. I would also like for this to be easily changed to search for other criteria or encompass them all. I am not sure how to go about this problem and would greatly appreciate any advice.

3 responses

mubashir aziz Posts 190 Registration date Sunday April 12, 2009 Status Member Last seen February 16, 2010 166
May 28, 2009 at 02:00 AM
Do you mean to say that both adjacent cells in column A & B > 0.1 turn B Red ????? Mean if and(A1>.01,B1>.01) then make cell B1 Red . if any of the condition if false then do nothing ..... Even if they are equal then will not work ....

simply put this formula in Conditional Formatting =AND(A1>0.01,B1>0.01). Make sure you are in Cell B1 .... if you want to apply whole column then select first Cell in B column and by pressing Shit or any method selected the last select of B and apply this formula =AND(A1>0.01,B1>0.01)





0
Excelguru Posts 261 Registration date Saturday April 11, 2009 Status Member Last seen June 21, 2011 307
May 28, 2009 at 02:31 AM
Hi

Instead of a macro, try conditional formatting
Select cell B1 and apply conditional formatting with formula =and(A1="Lead",B1 > .01) and color formatting to Red


Do let me know If it helps...
0
mubashir aziz Posts 190 Registration date Sunday April 12, 2009 Status Member Last seen February 16, 2010 166
May 28, 2009 at 04:43 AM
Sorry my mistake just replace the >.01 in A1 with ="lead"

and(A1>.01,B1>.01)

=AND(A1="Lead",B1 > .01)


0