ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   lookup value in column (https://www.excelbanter.com/excel-programming/393208-lookup-value-column.html)

raraschek

lookup value in column
 
thanks for help:
do you have any idea, how to find out, if a value (B5) IS in a range
(A2:A4000)?
I can´t sort these values, so I thought I can´t use any search function, and
don´t have idea how to compile this code. thanks

Mike H

lookup value in column
 
Hi,

Try this:-

Sub surface()
Set myrange = Range("A2:A4000")
For Each c In myrange
c.Select
If c.Value = "B5" Then
MsgBox (" B5 found in " & ActiveCell.Address)
End If
Next
End Sub

Mike

"raraschek" wrote:

thanks for help:
do you have any idea, how to find out, if a value (B5) IS in a range
(A2:A4000)?
I can´t sort these values, so I thought I can´t use any search function, and
don´t have idea how to compile this code. thanks



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

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