Find last used row in a column and offset by 2 columns

Eric12

New Member
Joined
Jun 11, 2018
Messages
9
I need some help with the code below. In column "A" I put in the date of a report I'm doing between ranges "A7:A33". I have a macro that looks for a certain value and it puts it in the next available row in column "N". On instances that the value is not found the cell will stay empty. What I'm trying to do is instead of inserting the value in the next available cell in column "N" I would like to find the last used row in range "A7:A33" and offset to column "N" to insert value.
Code:
If Sheets("Sheet1").Range("N7") = "" Then
    Sheets("Sheet1").Range("N7") = myValue1
Else
    Sheets("Sheet1").Range("N33").End(xlUp).Offset(1) = myValue1
End If
 

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.
Sorry thread name should be but I'm not sure how to edit.
[h=1]Find last used row in a column and offset to a different column.[/h]
 
Upvote 0
Try
Code:
Sheets("Sheet1").Range("A34").End(xlUp).Offset(1, 13) = myValue1
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,935
Members
449,094
Latest member
teemeren

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