Compare 2 cells from 2 sheets

madeline32

New Member
Joined
Jan 28, 2013
Messages
30
Can someone help me with this one, I will like a macro to compare row one to row one on sheet 2 column A. If the number is the same then it will compare from the same row column K from sheet 1 and column m from sheet2. If it is less then copy to sheet4 and highlight in red, if more than highlight in blue and if equal green. I will really appreciate it.
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Can someone help me with this one, I will like a macro to compare row one to row one on sheet 2 column A. If the number is the same then it will compare from the same row column K from sheet 1 and column m from sheet2. If it is less then copy to sheet4 and highlight in red, if more than highlight in blue and if equal green. I will really appreciate it.


Anyone?
 
Upvote 0
Your description is not very clear,

for instance the last part if it less copy to sheet 4 and red if more, blue if same green, do theses figures move to sheet 4 before changing colour?
 
Upvote 0
In the first line you say compare row 1 to sheet2 A1,

what do you mean by row 1? the whole row? We love to help, but can not if we do not understand the question.
 
Upvote 0
[QUser14;3433380]In the first line you say compare row 1 to sheet2 A1,

what do you mean by row 1? the whole row? We love to help, but can not if we do not understand the question.[/QUOTE]

Ok sorry about that, learning two new languages Macro and English.

Let see if I can explain a little better.

I will like to compare from Sheet1 (A1) to (A1) from sheet2
If they are the same then compare G1 from sheet1 to C1 in sheet2, if in that comparison G1 >C1 copy to sheet3 and color row in sheet3 to blue, if G1<C1 copy to sheet3 and color row in sheet3 to Blue an if G1=C1 copy to sheet3 and color row to green. I if A1 from sheet1 not the same with A1 from sheet2 do thesame with row to B2 etc..
 
Upvote 0
Ok sorry about that, learning two new languages Macro and English.

Let see if I can explain a little better.

I will like to compare from Sheet1 (A1) to (A1) from sheet2
If they are the same then compare G1 from sheet1 to C1 in sheet2, if in that comparison G1 >C1 copy to sheet3 and color row in sheet3 to blue,
 
Upvote 0
if G1 is less than C1 copy to sheet3 and color row in sheet3 to Blue an if G1=C1 copy to sheet3 and color row to green. I if A1 from sheet1 not the same with A1 from sheet2 do thesame with row to B2 etc..
 
Upvote 0

Forum statistics

Threads
1,214,822
Messages
6,121,772
Members
449,049
Latest member
greyangel23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top