ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Find the column you are in (https://www.excelbanter.com/excel-programming/351627-find-column-you.html)

Rishi Dhupar

Find the column you are in
 
Probably a simple answer to this, but I am doing a find using the
Range.Find function.

It is looking in all cells. Goal is to get column A's value for the
row that my string was found. How can I do this?

Was thinking about using offset, but I cannot figure out how to get the
column the string was found on.

Thanks


Norman Jones

Find the column you are in
 
Hi Rishi,

Dim Rng As Range, Rng2 As Range

Set Rng = Range(....).Find(......................)

If Not Rng Is Nothing Then
Set Rng2 = Rng.EntireRow.Cells(1)
End If



---
Regards,
Norman



"Rishi Dhupar" wrote in message
oups.com...
Probably a simple answer to this, but I am doing a find using the
Range.Find function.

It is looking in all cells. Goal is to get column A's value for the
row that my string was found. How can I do this?

Was thinking about using offset, but I cannot figure out how to get the
column the string was found on.

Thanks




Rishi Dhupar

Find the column you are in
 
I like it, thanks didn't know that existed.



All times are GMT +1. The time now is 09:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com