Find last row in column with specific value

sharky12345

Well-known Member
Joined
Aug 5, 2010
Messages
3,404
Office Version
  1. 2016
Platform
  1. Windows
I'm sure this is really easy but I can't figure it out - I'm trying to find the last cell in column A that has a specific value.

I currently have this, which gives me the value that I want, (in column B), but I need to now do it with criteria;

Code:
Range("J3").Value = Sheets("AVAILABLE").Range("B65000").End(xlUp).Value

Can someone show me how to adjust it so it looks for the last cell in column A that has the value "NEWPORT" and then returns the value from column B?
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
How about
Rich (BB code):
Sub sharky()
   Dim Fnd As Range
   
   Set Fnd = Sheets("AVAILABLE").Range("A:A").Find("Newport", , , xlWhole, xlByRows, xlPrevious, False, , False)
   If Not Fnd Is Nothing Then Range("J3").Value = Fnd.Offset(, 1).Value
End Sub
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,213,533
Messages
6,114,179
Members
448,554
Latest member
Gleisner2

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