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

drop05

Active Member
Joined
Mar 23, 2021
Messages
285
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.
 
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!
 
Upvote 0

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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