Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I've been trying for a while, but I can't figure it out - how do you search for a date cell from an array of dates - I can only search for string values, although all the cells contain dates. Did anyone have to do this before (no luck with search function) - any hints? Best regards |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Danny,
Perhaps something like: For Each cell In rng If IsDate(cell) Then 'do something End If Next cell -- Regards, Norman "Danny" wrote in message ... Hi, I've been trying for a while, but I can't figure it out - how do you search for a date cell from an array of dates - I can only search for string values, although all the cells contain dates. Did anyone have to do this before (no luck with search function) - any hints? Best regards |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Danny,
This code works for me. Have you tried the Find method? Sub test() Dim dt As Date Dim rng As Range dt = DateSerial(2003, 12, 2) Set rng = Sheet1.UsedRange.Find(what:=dt) If Not rng Is Nothing Then MsgBox rng.Address Set rng = Nothing End Sub -- Regards, Jake Marx MS MVP - Excel www.longhead.com [please keep replies in the newsgroup - email address unmonitored] Danny wrote: Hi, I've been trying for a while, but I can't figure it out - how do you search for a date cell from an array of dates - I can only search for string values, although all the cells contain dates. Did anyone have to do this before (no luck with search function) - any hints? Best regards |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Search for data and return multiple fields | Excel Discussion (Misc queries) | |||
Excel SHOULD NOT AUTO-CHANGE formated text fields to DATE FIELDS! | Excel Worksheet Functions | |||
Input one criteria to search in 5 fields | Excel Discussion (Misc queries) | |||
Date fields | Excel Discussion (Misc queries) | |||
HELP,how to show search result according to specifed criteria and selected fields | Excel Programming |