Macro to Compare two sheet with both sheets h [Solved/Closed]

Report
-
Posts
1862
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
July 30, 2015
-
Hello,

I have a 2 excel sheet which has all the column having same. This has D$C Comment, OMS comments, Planned Resoluiton date & Sub account in both the sheets

1st excel sheet has above metnioned subtitles are filled with data but the second sheet doesn't have data for D&C comments, OMS comments & planned resolution but has data for sub account

Sub account is the columns which is commong in both the sheets filled with Data. This is basically a number given to accoutn eg: Jp0224, KR0345 etc

1st Sheet has

Reason for Outstanding Action Taken Planned resolution Sub a/c
1 Timing issue Removed 30 Aug 10 Jp2035
2 Permission not dropped Sent mail 9 JUl 10 SG0235

2nd Sheet has

Reason for Outstanding Action Taken Planned resolution Sub a/c
1 Jp2035
2 SG0235


Now I need a macro for 2 excel sheet where in with reference to Sub a/c column it need pull data form 1st sheet to 2nd sheet in columns Reason Outstaing, Action Taken, Planned resoluiton

For above case the in 2nd sheet it should look like the first sheet

1 reply

Posts
1862
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
July 30, 2015
796
you do not need a macro
in sheet 2 in A2 copy paste this formula

=INDEX(Sheet1!A$2:A$100,MATCH(Sheet2!$D2,Sheet1!$D$2:$D$100,0),0)

and hit enter key.

I am assuming that there are less than 100 rows. see 100 in the above formula and also see the dollar signs in the formula

copy A2 in sheet 2 down as long as data is there and to the right till the column C
1
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2942 users have said thank you to us this month

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!