Find date in a cell that uses a formula

tbro

New Member
Joined
Oct 7, 2012
Messages
10
I've tried googling and searching this forum for this problem. I bet I'm not the first to ask, but I'm having a hard time finding the answer.

Here's the issue:

Cell A1: 2012-10-07
Cell A2: =A1+1

Cell A2 will return 2012-10-08, which is today's date.
I want to find the cell containing today's date, in this example it is cell A2.

If A2 was, like A1, written: 2012-10-08, I could find it using:
Cells.Find(date).Activate
However, now that A2 has a formula, I somehow need to search for the returned value in the cell..?

The same thing applies for locating year+week, which in my workbook are written YYWW, ie 1240 for today's year and week.
The first cell contains 1201 and the following ones point to one cell back and adds 1. Just like the A2 example.

Please enlighten me. Almost all workbooks contain this type of "formula-date" and I need to be able to find them.

Thanks in advance.

Regards,
Tbro
 

tbro

New Member
Joined
Oct 7, 2012
Messages
10
Cells.Find(date, , xlValues).Activate
It works fine if I create a new excel sheet. Somehow, though, I get an error in my big workbook. I thought "make a button" and went:
Sub finddate()
Cells.Find(Date, , xlValues).Activate
End Sub
Why do I get an error 91 when trying to run the sub?
I even tried naming a cell by today's date, but I still get that error.
 

tbro

New Member
Joined
Oct 7, 2012
Messages
10
My bad.

The cells are formatted as DD-MMM, ie 08-oct
How will I find this value in an easy way?
 

pooja_deshpande

Board Regular
Joined
Aug 31, 2012
Messages
54
try Cells.Find(Text(date,"dd-mmm"), , xlValues).Activate
 

Forum statistics

Threads
1,082,632
Messages
5,366,674
Members
400,912
Latest member
Click22

Some videos you may like

This Week's Hot Topics

Top