"Find last row in range" not working with numeric values... VBA

RobbieC

Active Member
Joined
Dec 14, 2016
Messages
376
Office Version
  1. 2010
Platform
  1. Windows
Hi there, I have a bit of code that I have just noticed isn't working properly

Code:
Dim getLastDescriptionRow As Long
getLastDescriptionRow = Sheets(SheetName).Range("BA17:BF54").Find("*", , xlValues, , xlByRows, xlPrevious).Row

I've looked into it and it fails to pick up the last row if they have numeric values. If the last row has letters in the cells, it picks it up fine...

Why would this not work when the values are just numbers?

If you can point me in the right direction, I'd be very grateful

Thanks
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
That had me scratching my head so i tested it and on my machine it works just fine with numbers whether they are created by formula result or just a number in a cell.
 
Upvote 0
Very strange... I've checked all the cell formatting and they're all set to 'general'...

I have expanded my range to take in the adjacent row which contains letters and not just numbers and it now works ok...

Just can't work out why it's not having it in that range with just the numbers....
 
Upvote 0

Forum statistics

Threads
1,215,371
Messages
6,124,529
Members
449,169
Latest member
mm424

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