Compare contents of 2 excell woeksheets

Closed
sdsouza5 - Nov 9, 2009 at 03:16 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Nov 9, 2009 at 09:58 PM
Hello,

I am clueless about VBA Programming. I need help with a small piece of code. Following is my problem description...


The first 3 columns of Worksheet 2 need to be compared with the first column of Worksheet 1 and the result needs to be stored as coloured cells in Worksheet 1.

Worksheet 1 Worksheet 2
--------------- ---------------
Col A Col A Col B Col C
TRUE TRUE TRUE FALSE
FALSE TRUE FALSE FALSE
FALSE FALSE TRUE FALSE
TRUE TRUE FALSE TRUE
TRUE FALSE TRUE FALSE

After the matching, Worksheet 1 should look as follows... i.e the respective cells should be filled with green and red colours.

Worksheet 1
---------------
Col A Col B Col C Col D
TRUE GREEN GREEN RED
FALSE GREEN GREEN GREEN
FALSE GREEN GREEN GREEN
TRUE GREEN RED GREEN
TRUE RED GREEN RED


Please help. Thanks
SD
Related:

1 response

venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Nov 9, 2009 at 09:58 PM
is there any typo in your color configuration. see the sheet beow. sheet2 values ae in the left and sheet 1 on the right
does not this configuration correct

TRUE TRUE FALSE TRUE
TRUE FALSE FALSE FALSE
FALSE TRUE FALSE FALSE
TRUE FALSE TRUE TRUE
FALSE TRUE FALSE TRUE
sheet 2------------------------- sheet1

is this not correct color configuration
B c D
green green red
red green green
green red green
green red green
red green red
sheet 1----------------
sheet1 from column 2 to right

check and clarify . the macro is ready.
0