VBA for match and copy on inserted column

leka21

New Member
Joined
Sep 22, 2014
Messages
1
Hello guys,

I'm working on a project where I have an spreadsheet to track hours on serialized equipment.
The running hours for each serial number is calculated in a sheet called "Calc" and is based on user input and reading from another excel file.
The other sheet I use is called "Master" and has a list of all possible serial numbers (in random order) and the purpose it to keep a history of the calculations and provide the accumulative running hours on the equipment.

More specifically:

Sheet "Calc", E10:E573 has the calculated hours (formula) for each serial number on column D. A number of items are used each time so that's why it's only counting till 573.

Sheet "Master", C7:C800 has all the possible serial numbers that can be used. Right of column F (G) is the place where I want to have the hours copied from "Calc" sheet.

To sum up, I need a button in "Calc" sheet which it will correspond the serial from column D to the serial in "Master" column C and will copy the hours ("Calc" E) to the corresponding cell in inserted column right of column F.
This means that the latest history will be in column G every time while everything else will be moved further to the right.

I'm using Excel 2010 on Windows 7.

Thank you for your help!
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,191,025
Messages
5,984,205
Members
439,878
Latest member
melodysc

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