macro to compare 2 cells and copy adjacent cell

stevep2k21uk

New Member
Joined
Mar 22, 2021
Messages
4
Office Version
  1. 2016
Platform
  1. Windows
hi,
something i need help with myself, i have an inventory scanner that scans a part then update quantity, it saves as an comma separated txt file called InvMgr.txt.
im wanting to :
  1. run the macro.
  2. it imports the file mentioned above into sheet2 from a specified location.
  3. then compares "sheet2 column A" with "sheet1 column B".
  4. then copy the cell adjacent (sheet2 column B)
  5. then paste to the cell on sheet1 column M. see below:
SHEET1
ABCDEFGHIJKLM
1000005 -
COMPARE WITH SHEET2 COL A
6
PASTE FROM SHEET 2 COL B
2

SHEET2​
A​
B​
0000056 - COPY THIS CELL
does this make sense?
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

stevep2k21uk

New Member
Joined
Mar 22, 2021
Messages
4
Office Version
  1. 2016
Platform
  1. Windows
edit.

Also to add i need to then select the whole of sheet1 and save just that as a .csv file for import onto my website.
 

Watch MrExcel Video

Forum statistics

Threads
1,129,569
Messages
5,637,100
Members
416,957
Latest member
Brovashift

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
Top