This is a discussion on Find specific cell using VBA within the Excel Questions forums, part of the Question Forums category; I have a table in Excel which has dates across the top and categories along the left. I am creating ...
I have a table in Excel which has dates across the top and categories along the left. I am creating a form in which you can specify your category and date and enter some text in a text box and when you click ok, a macro will find the correct cell on the table (using the date and category values) and copy the text. Has anyone got any code that will do this?
Thanks in advance
Someting like this..
MyDate = DateValue("07/18/08")
MyCat = "Category"
x = Application.Match(MyCat,Range("A1:A1000"),0)
y = Application.Match(Cdbl(MyDate),Range("A1:Z1"),0)
MyResult = Cells(x,y).Value
Hope that helps...
Last edited by Jonmo1; Jul 18th, 2008 at 09:01 AM.
Add-in for posting ranges as copyable tables (bottom of the page) -Win & Mac
The more we learn, and the better we get at our trade, the easier it becomes to overlook the obvious.
Life moves pretty fast. If you don't stop and look around once in a while, you could miss it.
Ferris Bueller A.K.A. John Hughes, 1986