macro shows mistakes and right items based on match two sheets with another

Ali M

Active Member
Joined
Oct 10, 2021
Messages
290
Office Version
  1. 2019
  2. 2013
Platform
  1. Windows
hello
I would code match based on column B into SH2,3 with sheet MAIN if they're matched then should arrange data into column C for SH1,2 based on sheet MAIN
should show the items is corrected in column D and the item is wrong in column E somtimes the error can be in first or middile or last item is wrong and somtimes there is missed items.
the missed items as in sheet result1 in last row . the item DM in sh2 is not existed but when arrange should be add in column D and not show in column E into sheet result1
as to missed items as in sheet result1 in first last row . the item DDTR in sh3 is not existed but when arrange should not show in column D and should show in column E into sheet result2, also if the wrong item doesn't contain space as in sh2,3 but it contains space in sheet MAIN then should consider error for the whole item which contain wrong space as in second row in sheet result2. the result should be in column D,E after arrange data in column C into sheet SH2,3 based on the macro


missed (1).xlsm
ABCDEFGH
1DATECODETTRMMRNNRQTYPRICETOTAL
207/08/2021SLFR-100FOOD-1PR100NRIT11025250
308/08/2021SLFR-101FOOD-2PR101NRIT22030600
409/08/2021SLFR-102FOOD-3PR102NRIT32335805
510/08/2021SLFR-103FOOD-4PR103NRIT42530750
611/08/2021SLFR-104FOOD-5PR104NRIT52040800
712/08/2021BTFOOD-6PR105NRIT61045450
813/08/2021BRRFOOD-7PR106NRIT72045900
914/08/2021SLFR-107FF/100PR107NRIT81555825
1015/08/2021DDTRFF/100L44PR108NRIT9560300
11TOT.MONTH1483655680
1201/09/2021DM120**225l20 FSLUNCHPR121NRIT221020200
1302/09/2021SLFR-1212000-15 55T N125 FDOPR122NRIT23520100
1403/09/2021VBA12325.5*S12.5 BOTTOLE 1LPR123NRIT242025500
15TOT.MONTH3565800
MAIN
Cell Formulas
RangeFormula
F11:H11F11=SUM(F2:F10)
H12:H14,H2:H10H2=F2*G2
F15:H15F15=SUM(F12:F14)



missed (1).xlsm
ABCDEF
1ITEMCODESSTRQTYPRICETOTAL
21VBA123123 215.5*S12.5BOTTOLE 1L PR123 NRIT2142335805
32SLFR-101FOOD-12 PR1011 NRIT2K560300
43SLFR-100 FOOOD-1 RF100 NBGFR1025250
54DM120***225l20 FSLUNCH PR121
SH2
Cell Formulas
RangeFormula
F2:F4F2=D2*E2


missed (1).xlsm
ABCDEF
1ITEMCODESSTRQTYPRICETOTAL
21DDTRFF/100L44PR108 NRIT9 JK/1002335805
32SLFR-1212000-16 55TN125 FDO560300
43BRRFOOD-1111 NRIT81025250
54SLFR-107FF/100 P107 NRIT81025250
SH3
Cell Formulas
RangeFormula
F2:F5F2=D2*E2


missed (1).xlsm
CDEFGH
1SSTRRIGHTWRONGQTYPRICETOTAL
225.5*S12.5 BOTTOLE 1LPR123 NRIT2425.5*S12.5 BOTTOLE NRIT24123 215.5*S12.5BOTTOLE NRIT2142335805
3 FOOD-2 PR101 NRIT2 FOOD-2 PR101 NRIT2FOOD-12 PR1011 NRIT2K560300
4 FOOD-1 PR100 NRIT1 FOOD-1 PR100 NRIT1FOOOD-1 RF100 NBGFR1025250
5120**225l20 FSLUNCH PR121 NRIT22120**225l20 NRIT22 120***225l20 1020200
RESULT1
Cell Formulas
RangeFormula
H2:H5H2=F2*G2



missed (1).xlsm
ABCDEFGH
1ITEMCODESSTRRIGHTWRONGQTYPRICETOTAL
21DDTRFF/100L44 PR108 NRIT9 JK/1002335805
32SLFR-1212000-15 55T N125 FDO PR122 NRIT232000-15 55T N125 FDO PR122 NRIT232000-16 55TN125 560300
43BRRFOOD-7 PR106 NRIT24FOOD-7 PR106 NRIT24FOOD-1111 NRIT81025250
54SLFR-107FF/100 PR107 NRIT8PR107P1071025250
RESULT2
Cell Formulas
RangeFormula
H2:H5H2=F2*G2

I hop what I ask for it . can be possible or logic espically if my result is not clear in sheets result1,2 . if it's not please guide me what the best way to do that .


thanks
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Forum statistics

Threads
1,215,332
Messages
6,124,314
Members
449,153
Latest member
JazzSingerNL

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