Compare columns and update the row
Closed
Hello,
I need some help with a VBA code. I have tried differents codes that i found in the forum but they didn t match with what i m looking for.
I have a workbook with 2 sheets (Master , Master1). Both sheets have 5 columns A to E. (A:E).
All i need is a module macro that will compare the data in columnA of "Master" to columnA of "Master1".
Then copy the corresponding data of columnB to E of "Master1" to columnB to E of "Master" if the data
in columnA of "Master1" is same with the data in columnA of "Master", if not
just leave the data in columnA of "Master" and leave blank the corresponding column.
Regards
I need some help with a VBA code. I have tried differents codes that i found in the forum but they didn t match with what i m looking for.
I have a workbook with 2 sheets (Master , Master1). Both sheets have 5 columns A to E. (A:E).
All i need is a module macro that will compare the data in columnA of "Master" to columnA of "Master1".
Then copy the corresponding data of columnB to E of "Master1" to columnB to E of "Master" if the data
in columnA of "Master1" is same with the data in columnA of "Master", if not
just leave the data in columnA of "Master" and leave blank the corresponding column.
Regards
Related:
- Compare columns and update the row
- Saints row 2 cheats - Guide
- Tentacle locker 2 pool update apk - Download - Adult games
- Tweetdeck larger columns - Guide
- Ps3 update usb - Guide
- How do i update my facebook account to new version and design - Guide
1 response
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Oct 27, 2011 at 07:04 AM
Oct 27, 2011 at 07:04 AM
why do you need a macro . simpler way is a formula and then to be copied
suppose master sheet is like this
heading1 heading2 heading3 heading4 heading5
a
d
g
w
r
master1 is like this
heading1 heading2 heading3 heading4 heading5
a 1 74 6 91
s 95 55 23 21
d 42 71 63 53
f 92 93 23 60
g 19 12 27 32
h 49 64 45 23
j 54 55 42 73
k 36 96 51 37
now in master sheet in B2 type(or copy) this formula
copy B2 both across and down .
suppose master sheet is like this
heading1 heading2 heading3 heading4 heading5
a
d
g
w
r
master1 is like this
heading1 heading2 heading3 heading4 heading5
a 1 74 6 91
s 95 55 23 21
d 42 71 63 53
f 92 93 23 60
g 19 12 27 32
h 49 64 45 23
j 54 55 42 73
k 36 96 51 37
now in master sheet in B2 type(or copy) this formula
=IF(ISNA(VLOOKUP($A2,master1!$A$1:$E$100,COLUMN(B1),0)),"",VLOOKUP($A2,master1!$A$1:$E$100,COLUMN(B1),0))
copy B2 both across and down .
Oct 27, 2011 at 07:50 PM
Let say:
Master ( latest Rev. )
Col A Col B Col C Col D Col E
b
c
f
g
h
z
t
Master Rev.0
Col A Col B Col C Col D Col E
b 35 3 6 9
c 5 4
f
g 6 2
h 3 2 45 3
Result:
Master ( latest Rev. )
Col A Col B Col C Col D Col E
b 35 3 6 9
c 5 4
f
g 6 2
h 3 2 45 3
z
t
Then again if i have another latest data ,the master (latest Rev) will be copy to another sheet then it will rename as MAster Rev.1, same procedure the latest rev will compare again to the previous rev. now it is Master rev1.