Originally Posted by
ProspectiveCounselor
Hello,
I have a couple of problems with the code. For reference, I'm using Windows 7 and Excel XP.
I hate to bring up dead threads, but I was looking to do a DATEDIF function for Excel so that I could subtract dates. I tried all three sets of code provided in the code boxes, but I keep getting a #VALUE! error. I'm pretty new to VBA, though I have a few years of experience in PHP, C++, and Java (and a few minutes' experience with Perl), so I can't go in and debug because I don't understand all the terms. Can one of you tell me what I'm doing wrong? Here are my cells, so you guys can replicate the problem.
A1 = today()
B1 = today() + b2
B2 = 60 //I also used -60 to see if I had the dates backwards.
C1 = xldatedif(A1,B1)
Bookmarks