VBA: Copy

DougStroud

Well-known Member
Joined
Aug 16, 2005
Messages
2,976
Office Version
  1. 365
Platform
  1. MacOS
I need a little assistance w/ this line of code.
Copy AA3 to the last row in AA and paste up.

Here is what I have:
Range("AA3").Copy Range("AA" & Rows.Count).End(xlUp).Row


thanks..

ds
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Hi, again,

see your other question, just answered
Code:
Range("AA3").Copy Range("AA3:AA" & Range("AA" & Rows.Count).End(xlUp).Row)
you didn't post is as the same question but perhaps the answer will be the same

best regards,
Erik
 
Upvote 0
Erik,
you didn't post is as the same question but perhaps the answer will be the same
Different situation.

The code you provided copies from AA3 to the last Row, which after going back and reviewing, my example is flawed.

I failed to state that I need it to fill off of the last filled cell in row "H".

What I need it to do is find the last Row in "H" and Copy AA3 to the last Row in "AA"" "Up" to the last non blank cell in "AA".

Example:
AA90 is the last non blank cell
H3:H90 has data
I want to copy the formula in AA3 to AA91:AA95

Sorry about the confusion.
 
Upvote 0
I have data in H91:Z95
I also have data in AA5:AA90
AA3 is a formula, AA4:AA90 was a formula but has been converted to values through pastevalues.
Instead of copying down which would alter my values incorrectly, I want to copy the formula instead, to the last empty cells in column AA.
In this case AA91:AA95
I want to copy the formula that is in AA3 to the last row in AA based off the last row in Column H.
 
Upvote 0
3"

you have seen many times the formula to find the last row

so your work will be to edit this line
Code:
Range("AA3").Copy Range("AA91:AA95")
hint:
Range("AA3").Copy Range("AA" & R & ":AA" & RR)
 
Upvote 0
Erik,

How would you paste the value?

Range("A1:U" & Cells(Rows.Count, "U").End(xlUp).Row).Copy
Range("A1").PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

Range("A1:U" & Cells(Rows.Count, "U").End(xlUp).Row).Copy Range("A1").PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
 
Upvote 0
How would you paste the value?

Range("A1:U" & Cells(Rows.Count, "U").End(xlUp).Row).Copy
Range("A1").PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Code:
With Range("A1:U" & Cells(Rows.Count, "U").End(xlUp).Row)
.Value = .Value
End With
 
Upvote 0

Forum statistics

Threads
1,225,071
Messages
6,182,685
Members
453,132
Latest member
nsnodgrass73

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