Use FIND to find a Row Number

Mackeral

Board Regular
Joined
Mar 7, 2015
Messages
232
Office Version
  1. 365
Platform
  1. Windows
VBA Code:
   With SHEET.Range("A3:A321")
        Hold = .Find(What:="Albany Tire", LookIn:=xlValues)
    End With    

    If Hold <> "" Then
        Answer_Row = Hold.Row '      Error on this line
        Answer_Col = Hold.Column'   Error on this line
    End If

This code use to work but doesn't now.
Cell("A23") contains "Albany Tire",
Both the "Answer" lines give errors now.

What's wrong? Many thanks.
 
It's Monday, and the original code works now.
Thanks for ruining our weekends by leaving up weekend code that doesn't work, so we can't work on weekends.
 
Upvote 0

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
It's Monday, and the test code M/S over the weekend had disappeared and the regular code has been replaced
AND MY CODE WORKS TODAY.
I only wish I could have worked on it during the weekend. Not everybody only works 5 days a week.
 
Upvote 0
My apology. I thought I'd closed this last week, but here it is now.

The reality is that when I tried my code on Sunday it didn't work. When I tried exactly the same code on Monday, it did work.
The problem as I see it now is that M/S is running a test version on the weekends which in which you will very likely find
something that doesn't. Last weekend, for instance, I was trying to use a system variable which was undefined on the weekend.
The ultimate solution is not to use 365 on weekends.
 
Upvote 0
In future please do not mark a post as the solution when it does not conatin one.
Thanks.

I use Excel all through the week & as far as I'm aware M/S do NOT run a "test" version at weekends.
 
Upvote 0

Forum statistics

Threads
1,215,453
Messages
6,124,918
Members
449,195
Latest member
Stevenciu

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