Weekday formula problems

jrschaef

New Member
Joined
May 29, 2003
Messages
12
I have entered a formula and it works fine in my excel sheet that I have saved, but when I send it out to others through email and they open the sheet the formula gives the a #NAME error. Why would this be and what do I need to solve this?

The formula is

=Weekday(Today(),-1)
 

Some videos you may like

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

TommyGun

MrExcel MVP
Joined
Dec 9, 2002
Messages
4,202
This formula returns a #NUM error on my PC because the -1 is not a valid return type. Are you sure it works on your PC?
 

Cbrine

Well-known Member
Joined
Dec 2, 2003
Messages
3,196
I tried your formula on my system using Excel 97. The -1 parameter doesn't work on 97. You can set it to 1,2,3,4 but they return a value, not text. I would sugget you use one of those values, and then vlookup a day value from a table. This should get around any version difference problems.

Hope this helps.
 

kkknie

Well-known Member
Joined
Apr 29, 2002
Messages
677
Is it possible that the Today() function is fairly new? I've always used the Now() function for dates (even though it does give time) mainly because I didn't know about the Today() function. Maybe convert yours to Now() and test?

Others may have a better slant on this...

K
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,201

ADVERTISEMENT

=Weekday(Today(),-1)

I'd expect #NUM! instead of #NAME?.

Btw, what does this formula supposed return with return-type = -1 ?
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,201

ADVERTISEMENT

kkknie said:
Is it possible that the Today() function is fairly new? I've always used the Now() function for dates (even though it does give time) mainly because I didn't know about the Today() function. Maybe convert yours to Now() and test?

Others may have a better slant on this...

K

One of the incredible habits, using NOW() while one is only interested in todays's date. I don't think TODAY() is something new.
 

Cbrine

Well-known Member
Joined
Dec 2, 2003
Messages
3,196
just_jon said:
Perhaps this is a UDF, not native XL, function?

Can you override a built in Excel function with a UDF? I've never tried.
 

texasalynn

Well-known Member
Joined
May 19, 2002
Messages
8,458
Isn't WEEKDAY from the add-in Analysis Toolpak?

So if it's not setup on the other PC's you would get #NAME

HTH
texasalynn
 

Zack Barresse

MrExcel MVP
Joined
Dec 9, 2003
Messages
10,881
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
  3. Web
no, WEEKDAY is a native excel function.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,122
Messages
5,599,830
Members
414,341
Latest member
Mohammedsobhey

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