Macro to Find Cell Containing Certain Data

MikeeRDX

Board Regular
Joined
Feb 16, 2014
Messages
98
Hi, Is there a macro that will help me find a cell containing a certain data in a column of data? Much similar to how the Find Last Row or Find Empty Row macro works but instead, I would like to select an existing data from a drop down menu and have it find that data and bring it to view. Thank you in advance!
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
This code assumes the value being sought for is in cell A1 and the search is in column G. The code selects the cell that matches the search value, if no value is found, it does nothing :)

Code:
Sub finddate()
    On Error Resume Next
    Range("G1:G" & Range("G" & Rows.Count).End(xlUp).Row).Find(Cells(1, 1), Cells(1, "G")).Select
End Sub
 
Upvote 0
HI....Thank you for your help. I plugged it in but it doesn't do anything. Here is how my data is setup. The value being sought is in cell K6. The column of data I'm trying to match the value with is in column "b" and it starts at B7. This is what I did from your instruction.

On Error Resume Next
Range("b7:b" & Range("b" & Rows.Count).End(xlUp).Row).Find(Cells(11, 6), Cells(11, "b")).Select
End Sub
 
Upvote 0
Cell K6 should be
Code:
Cells(6,11)
not the other way round and B7 would be
Code:
 cells(7, "B")

SO
Code:
Sub finddate()    On Error Resume Next
    Range("B7:B" & Range("B" & Rows.Count).End(xlUp).Row).Find(Cells(6, 11), Cells(7, "B")).Select
End Sub
 
Upvote 0
Thank you for your help. I believe I know what is wrong now and it due to the way my data is setup. You see, I currently have my data setup to full from another sheet. For example, the actual data is on Sheet1. But I need it to be copied (=if(sheet1!Q15>0,Sheet1!Q15," "). The original formula to copy over the data is what preventing the code to operate. I still need the setup in this manner because I'm using this sheet to input additional data. Is there a way to make this work given the current setup?
 
Upvote 0

Forum statistics

Threads
1,214,276
Messages
6,118,624
Members
448,844
Latest member
Jayee04e

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