Find date problem---c is still nothing

poorwallace

Active Member
Joined
Mar 8, 2005
Messages
365
I've got a small macro here which worked on my home computer but is not working here at work....I can't seem to figure out why (it looks good to me). I was hoping somebody could figure out where I'm mistepping. The problem, specifically, is that at the "set c" part of the code, c is not being found, when it clearly is in the range...I've gone to the immediate window and checked.....

Thanks

Code:
Sub test()

Dim todaydate
todaydate = Date

With Sheets("Supplement").Range("A1:A10000")
    Set c = .Find(todaydate, LookIn:=xlValues)
 
    If Not c Is Nothing Then
        c.Offset(0, 7).Copy
        c.Offset(0, 7).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
        Application.CutCopyMode = False
    End If
 
End With

End Sub
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

poorwallace

Active Member
Joined
Mar 8, 2005
Messages
365
Thanks! That worked! However, why is it that the xlformulas worked, while couldn't use xlValues? Clicking into the cell, it is not a formula...Am I not understanding something fairly simple here (it wouldn't be the first time :p )...If anyone could give a possible explanation to me why xlFormula worked when xlValues did not (though it did on my home computer), I would really appreciate it.

Anyways, thanks!
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,851
Messages
5,833,974
Members
430,249
Latest member
Muka

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
Top