copy paste with last row formula

jordanburch

Active Member
Joined
Jun 10, 2016
Messages
439
Office Version
  1. 2016
Hey all,
I have the below. It finds the last row and then finds it again and then copy and pastes the formulas.

This is the line where it errors out

Range(("J" & lRow) + 1).Select

I am getting a type mismatch error 1004 on that line. I dont really understand why. Any help is appreciated!

Jordan

Sheets("CARS TO HQARS BUMP").Select
Range("C44:C70").Select
Selection.Copy
Sheets("AUG FY21 IDARRS").Select
Dim lRow As Long
lRow = Cells(Rows.Count, 10).End(xlUp).Row

Range(("J" & lRow) + 1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range(("K" & lRow) + 1).Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=+ABS(RC[-1])"
Range(("K" & lRow) + 1).Select
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
You have your parentheses in the wrong spot.

Try this:
VBA Code:
Range(("J" & (lRow + 1)).Select
 
Upvote 0
Solution
You are welcome.

Notice that you need to add one to the number being combining it with the column letter.
You cannot add one to a text value like "J1".
 
Upvote 0

Forum statistics

Threads
1,213,550
Messages
6,114,265
Members
448,558
Latest member
aivin

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