Middle man workbook to Copy paste values from one workbook to another

drop05

New Member
Joined
Mar 23, 2021
Messages
14
Office Version
  1. 365
Platform
  1. Windows
Hello,

I was wondering if there is a way to have three workbooks. Workbook1 has multiple sheets, example sheet1, sheet2, ect, with tables with cells containing questions and then the cell next to it where values can be typed into. Workbook3 has the a similar format but the cells that need values are blank. Is there VBA to be able to map those imported values from workbook1 to get into the blank cells in workbook3. Workbook 2, the middle one, will contain the vba to run this, inside has columns with the sheet names from both workbook1 and 3, the rows and columns to copy from workbook1 and the ones for workbook3.

Any help would be appreciated! New to VBA so playing around with it.
 

drop05

New Member
Joined
Mar 23, 2021
Messages
14
Office Version
  1. 365
Platform
  1. Windows
You can perform any calculation in variable say:

Dim sumA as Double
sumA = wsA.Range("A1") + wsA.Range("A2")


then say your worksheet3 is defined as ws3

ws3.Range("A1") = sumA

no need to calculate on worksheet but just in memory.

A note on big range. The destination can be just a single cell like you perform copy range in Excel. You copy a big range then then when pasting you just click a single cell in destination (not a similar range).
So, it is just like like this (probably you have this figured)

wsA.Range("A1", "H10").Copy wsB.Range("A6")
Amazing, very well said, thank you so much this helps a lot as I am playing around with this language!
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

Watch MrExcel Video

Forum statistics

Threads
1,130,402
Messages
5,641,931
Members
417,247
Latest member
Chitaah

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