vba select first cell with same value as another cell

bluefeather8989

Active Member
Joined
Nov 20, 2009
Messages
325
Office Version
  1. 365
Platform
  1. Windows
Need vba to select first cell with same value as another cell
If M5 input is Wednesday then marco will find the first cell in range C:C that containes wednesday.

TV Shows.xlsm
C
3Saturday
4Sunday
5Sunday
6Sunday
7Sunday
8Monday
9Monday
10Monday
11Monday
12Monday
13Monday
14Monday
15Tuesday
16Tuesday
17Tuesday
18Tuesday
19Tuesday
20Tuesday
21Wednesday
22Wednesday
23Wednesday
24Wednesday
25Wednesday
26Wednesday
27Wednesday
28Thursday
29Thursday
30Thursday
31Thursday
32Thursday
33Thursday
34Thursday
35Friday
36Friday
37Friday
38Friday
List

TV Shows.xlsm
M
5Saturday
List
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
VBA Code:
Sub jec()
 On Error Resume Next
  With Sheets("List")
    Application.Goto .Range("C1", .Range("C" & Rows.Count).End(xlUp)).Find(.Range("M5"))
  End With
 If Err.Number Then MsgBox "not found"
End Sub
 
Upvote 0
Solution

Forum statistics

Threads
1,215,427
Messages
6,124,830
Members
449,190
Latest member
rscraig11

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