Find a Date when "d" formated

Aknak

New Member
Joined
Nov 15, 2013
Messages
13
Hi,

I have one excel sheet with the date 30/01/2021 custom formated with "d" to show me only the day (30).

When I try to find the same date, in the format 30/01/2021, with "Find and Select" I get the message:

"We couldn't find what you were looking for. Click Options for more ways to search."

What I need to do to find it?

And, how I can find the same with VBA code "selection.find" or "cells.find" ?

Kindly, someone can help me?

Thanks in advance.

Luis
 
Find searches for what appears visually and so a date with the column width not wide enough will not be picked up as it displays multiple ##.
On the same principal with your original data try putting 30 in the find what box, also @Alex Blakenburg suggested works for me.
Hi Mark,

If I try to find 3, 30 or another day also works for me, but I won't find the full date in format dd/mm/yyyy) when the cell shows only the number of the day.

Because if you select the range and search you got 2 results if you find by "30".

1616990042628.png


To understand better, the white cells in the range have one formula and a conditional formating to fill white if the date is not a day of the month, in this case, January .

1616991757021.png



More interesting If I use VBA,

1616992685948.png



I got the correct value, find the short date and return the value. Why in excel I can't? :)

Thanks for your atention.

Ak
Lisbon / Portugal
 

Attachments

  • 1616991366183.png
    1616991366183.png
    46.3 KB · Views: 8
  • 1616991527519.png
    1616991527519.png
    69 KB · Views: 7
Upvote 0

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Try setting your options to formulas rather than Values and are your Regional settings in Windows for short date set as dd/mm/yyyy ?
 
Upvote 0
Doesn't answer whether you have the options set to formulas, in post 11 they are set as Values
 
Upvote 0
I think we are going to have to just agree its quite quirky.

Find Lookin Formulas - Constants
If you use the Short Date per your Region Setting (the year has to be 4 digits) in the Find what box
This will find all dates that are not based on formulas regardless of how the date is formatted.
It will not find dates that are the result of formulas

Find Lookin Values
Unlike the above, this will only find dates formatted the way you type it into the Find what box.
If you have dates that are the result of a formula you have no choice but to use this. It will find any dates formatted the same you have represented it in the Find what box regardless of whether they are a constant or a result of a formula.

VBA is consistent with the above

Find on Android
The find here automatically switches between both the above.
If in the find box you type in the Region formatted date, it will find all the constants regardless of the formatting but only the results of formulas that match what you typed into the find box. There is no manual option to select formulas or values
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,260
Members
449,075
Latest member
staticfluids

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