VBA Find Question

Emily

Active Member
Joined
Aug 28, 2002
Messages
304
The last two statement works in Office XP but not in Offce 2000, why?

Set FourWeeksCycle = Range("D9:AE9")
Set PHDate = Sheets("PH").Range("A2:A18")
For Each PHFind In FourWeeksCycle
If Application.CountIf(PHDate, PHFind.Value) = 1 Then 'Replace the code below
'Set f = PHDate.Find(PHFind, lookat:=xlPart
'If Not f Is Nothing Then
This message was edited by Emily on 2002-10-22 11:34
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
How are your dates formatted?

1. If dd/mm/yyyy it works with:

Set f = PHDate.Find(PHFind.Value, lookat:=xlPart)

2. If formatted as d-mmm-yy it works with:

Set f = PHDate.Find(PHFind.Text, lookat:=xlPart)

although I did have a problem in that 1-Oct-02 found 11-Oct-02. 2-Oct-02 was correct.

3. I could not get it to work with dd-mmm-yy.

Weird! If you ask me there are some serious
bugs with UK/European dates in Excel 2000.
 
Upvote 0

Forum statistics

Threads
1,215,055
Messages
6,122,902
Members
449,097
Latest member
dbomb1414

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