VBA copy from cell range to current location.

bertilak

New Member
Joined
Jun 5, 2019
Messages
17
Let's say my spreadsheet has cells A1 through A3 that look like

123 456 789

Those are the values that display but they are calculated by formulas in the cells.

I want a macro that will copy those three values (not the formulas) and past them in three cells
wherever my active cell happens to be.

The following works except that it copies/pastes the formulas themselves instead of the "123 456 789":

VBA Code:
Range("A1:A3").Copy Destination:=ActiveCell

Seems like it should be easy!

I have one reference book "Microsoft Excel 2019" but I can't find something this simple.
Google turns up lots of stuff but everything assumes the data to be copied is simple numerical or text values,
not the results of a formula.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Is this what you are after
VBA Code:
Range("A1:A3").Copy
ActiveCell.PasteSpecial Paste:=xlPasteValues
 
Upvote 0
Solution

Forum statistics

Threads
1,224,820
Messages
6,181,159
Members
453,021
Latest member
Justyna P

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