access 2016 vba - Find the first cell that starts with

RCBricker

Well-known Member
Joined
Feb 4, 2003
Messages
1,560
I have exported my query to excel. I need to format the rows based on a range of data. This range of data begins with the number 4 (it is a text string though). How can I find the first and last cell in a column that STARTS with the number 4 (as a text)?

I tried to use a .FIND but there are cells with a 4 in the string before the range that begins with a 4 and after that range ends.

Code:
        Set rng = wsCOA.Range(.Cells(4, 1), .Cells(lngROW, 1))
        
        
        
        
        intBUD1 = rng.Find(strBUD1).Row

any ideas?

thanks
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Reads very much like an Excel question, although your post title says Access. I'm confused by that.
You might have better luck getting an answer if you posted in the Excel part of the forum, assuming that's really what this is. I'm afraid that while I do dabble in some Excel vba, it's not my strength. Please come back here a post a link to your new thread if you start one.
 
Upvote 0
Reads very much like an Excel question, although your post title says Access. I'm confused by that.
You might have better luck getting an answer if you posted in the Excel part of the forum, assuming that's really what this is. I'm afraid that while I do dabble in some Excel vba, it's not my strength. Please come back here a post a link to your new thread if you start one.

You sir are correct!

I am exporting to Excel from access. So I focuses on the wrong forum.

btw I solved this so no need for a new thread.
 
Upvote 0

Forum statistics

Threads
1,221,805
Messages
6,162,081
Members
451,738
Latest member
gaseremad

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