Find the position of a date.

eduzs

Well-known Member
Joined
Jul 6, 2014
Messages
704
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
In column "A" I have texts, values, and one cell with a DATE.
I need to find in which row is there this date.
Is there a formula to do that?
Many thanks
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Could you show some examples along with expected results?
To follow up on Marcelo's question... show us actual values that could be in the cells (do not simplify things by using 1, 2, 3, etc. for you numbers unless those are your real numbers).
 
Upvote 0
Thanks, I have this kind of data in the column "A"

1,43
50,14
Vendido
Suportes
Resistências
Último Preço
Papel
13/09/2017
MACD

<tbody>
</tbody>

So I need to retrieve this date "13/09/2017", or get the address where it is.

The date is not always the same, nor always in the same cell address in the 1500 rows sheet.

Thanks.
 
Last edited:
Upvote 0
Thanks, I have this kind of data in the column "A"

1,43
50,14
Vendido
Suportes
Resistências
Último Preço
Papel
13/09/2017
MACD

<tbody>
</tbody>

So I need to retrieve this date "13/09/2017", or get the address where it is.

The date is not always the same, nor always in the same cell address in the 1500 rows sheet.
Give this formula a try (you will probably have to format the cell you put it in as a Date)...

=LOOKUP(9E+99,A:A)
 
Upvote 0
Or maybe this UDF (user Defined Function)
Code:
Function FindDate(r As Range)
    Dim rFound As Range
   
    Application.FindFormat.NumberFormat = "m/d/yyyy"
    Set rFound = r.Find(What:="*", SearchFormat:=True)
    If Not rFound Is Nothing Then
        FindDate = rFound.Row
    Else
        FindDate = "Not Found"
    End If
End Function


A
B
C
1
DateRow​
2
1,43​
14​
3
3,45​
4
50,14​
5
Vendido​
6
MACD​
7
Resistências​
8
Suportes​
9
Resistências​
10
Último Preço​
11
Último Preço​
12
Papel​
13
Nível IFR 14​
14
13/09/2017​
15
MACD​

Formula in C2
=FindDate(A2:A15)

M.
 
Upvote 0
Give this formula a try (you will probably have to format the cell you put it in as a Date)...

=LOOKUP(9E+99,A:A)
Silly me :oops:... a much simpler formula is available (you will still have to format the cell you put it in as a Date).

=MAX(A1:A15)
 
Last edited:
Upvote 0
Or maybe this UDF (user Defined Function)
Code:
Function FindDate(r As Range)
    Dim rFound As Range
   
    Application.FindFormat.NumberFormat = "m/d/yyyy"
    Set rFound = r.Find(What:="*", SearchFormat:=True)
    If Not rFound Is Nothing Then
        FindDate = rFound.Row
    Else
        FindDate = "Not Found"
    End If
End Function
Another way to write a UDF to return the row number...
Code:
Function FindDate(R As Range) As Long
  FindDate = Application.Match(Application.Max(R), R, 0)
End Function
 
Last edited:
Upvote 0
Silly me :oops:... a much simpler formula is available (you will still have to format the cell you put it in as a Date).

=MAX(A1:A15)


Rick,
The stock market in Brazil is up. The IBOVESPA (general index as the Dow Jones in US) today stands at more than 70,000 points.
So your formula is a bit risky ...

Just kidding. :)
Of course you could not know that the data refer to stock quotes in Brazil - the text is in Portuguese.

M.
 
Upvote 0
Thanks Marcelo and Rick,
I understood that there is no way to directly verify the existence of a date, I will use one of the suggested solutions.
 
Upvote 0

Forum statistics

Threads
1,216,077
Messages
6,128,673
Members
449,463
Latest member
Jojomen56

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