Find a cell location

gheyman

Well-known Member
Joined
Nov 14, 2005
Messages
2,342
Office Version
  1. 365
Platform
  1. Windows
I have a table that can start in a different row each time the user is working in the workbook.

Is there a way to find what cell the header "Index" is in? It will always be in column B but the row will change from time to time.

I need to use this location in order to find the Intersect (so I would also need to determine the last Row of column B)

here is what I need to adjust:
If Intersect(ActiveCell, Range("B16:E" & LR)) Is Nothing Then
MsgBox "You must select a cell within the applicable Proposal Row. Select a valid Cell"
Exit Sub
End If


Thanks
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
I was able to use an old post from Mumps to find where "Index" is in column B. But I cannot figure out how to modify this code - specifically the Intersect section.

I want to identify the Intersect. So I tried incorporating Mumps advise from the other post

Dim fndIndex As Range
Set fndIndex = Range("B:B").Find("Index", LookIn:=xlValues, lookat:=xlWhole)


If Intersect(ActiveCell, Range("B" & fnd.Row + 1, Range("AJ" & LR9))) Is Nothing Then
MsgBox "You must select a Cost Source in column E (VendorName). Select a valid Cell, then click Select"
Exit Sub
End If

But this obviously didn't work - Help Please!!!
 
Upvote 0
Solved

If Intersect(ActiveCell, Range("B" & fndIndex.Row + 1, Range("AJ" & LR9))) Is Nothing Then
MsgBox "You must select a Cost Source in column E (VendorName). Select a valid Cell, then click Select"
Exit Sub
End If
 
Upvote 0
Solution

Forum statistics

Threads
1,217,053
Messages
6,134,310
Members
449,865
Latest member
dhpaul1031

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