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

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
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!
 
Upvote 0

Forum statistics

Threads
1,214,592
Messages
6,120,433
Members
448,961
Latest member
nzskater

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