
28-Jul-2006, 08:27 AM
|  | Guest | | | | | | | | | | Logic Error on If formula Hi
I have a formula which should produce yesterdays data if today is
tues,wed,thur or fri, if today is monday it should produce fridays data, and Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/12227-logic-error-on-if-formula.html
sometimes there isn't any data at all. Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12227
IIf(Weekday(Date()=1),Date()-3,Date()-1)
this method works if today is monday.
IIf(Weekday(Date()=1),Date()-1,Date()-3)
this method works if its tues, wed, thur or fri
Is it possible to get it working for everyday?
Thanks
Wendy *
Do share your immediate thoughts or reactions on this issue? We value your views! Login Now! or Sign Up Today! to share your views with us.. Gurfateh! | 
28-Jul-2006, 08:27 AM
|  | Guest | | | | | | | | | | Re: Logic Error on If formula Parenthises, Parenthises..
IIf(Weekday(Date(),2)=1,Date()-3,Date()-1) ' 2 = to denote Monday as
firstdayofweek = vbMonday
"Wendy" wrote in message
news:UcudnXi3_KlDzD_ZnZ2dnUVZ8tydnZ2d@bt.com...
> Hi
>
> I have a formula which should produce yesterdays data if today is
> tues,wed,thur or fri, if today is monday it should produce fridays data,
> and
> sometimes there isn't any data at all.
>
> IIf(Weekday(Date()=1),Date()-3,Date()-1)
> this method works if today is monday.
>
> IIf(Weekday(Date()=1),Date()-1,Date()-3)
> this method works if its tues, wed, thur or fri
>
> Is it possible to get it working for everyday? Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12227 Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12227
>
> Thanks
>
> Wendy
>
> | 
28-Jul-2006, 08:27 AM
|  | Guest | | | | | | | | | | Re: Logic Error on If formula Parenthises, Parenthises..
IIf(Weekday(Date(),2)=1,Date()-3,Date()-1) ' 2 = to denote Monday as
firstdayofweek = vbMonday
"Wendy" wrote in message Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12227
news:UcudnXi3_KlDzD_ZnZ2dnUVZ8tydnZ2d@bt.com...
> Hi
>
> I have a formula which should produce yesterdays data if today is
> tues,wed,thur or fri, if today is monday it should produce fridays data,
> and
> sometimes there isn't any data at all.
>
> IIf(Weekday(Date()=1),Date()-3,Date()-1)
> this method works if today is monday.
>
> IIf(Weekday(Date()=1),Date()-1,Date()-3)
> this method works if its tues, wed, thur or fri Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12227
>
> Is it possible to get it working for everyday?
>
> Thanks
>
> Wendy
>
>
--
----------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 4079 spam emails to date.
Paying users do not have this message in their emails.
Get the free SPAMfighter here: http://www.spamfighter.com/len | 
28-Jul-2006, 08:28 AM
|  | Guest | | | | | | | | | | Re: Logic Error on If formula Thanks, I often get muddled up on how many I actually need!
Wendy
"Pieter Wijnen"
..with.norway> wrote in message news:esAz4KqmGHA.2112@TK2MSFTNGP04.phx.gbl...
> Parenthises, Parenthises..
>
> IIf(Weekday(Date(),2)=1,Date()-3,Date()-1) ' 2 = to denote Monday as
> firstdayofweek = vbMonday
>
>
> "Wendy" wrote in message
> news:UcudnXi3_KlDzD_ZnZ2dnUVZ8tydnZ2d@bt.com...
> > Hi
> >
> > I have a formula which should produce yesterdays data if today is Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12227
> > tues,wed,thur or fri, if today is monday it should produce fridays data,
> > and
> > sometimes there isn't any data at all.
> >
> > IIf(Weekday(Date()=1),Date()-3,Date()-1)
> > this method works if today is monday.
> >
> > IIf(Weekday(Date()=1),Date()-1,Date()-3)
> > this method works if its tues, wed, thur or fri
> >
> > Is it possible to get it working for everyday?
> >
> > Thanks
> >
> > Wendy
> >
> >
>
>
>
> --
> ----------------------------------------
> I am using the free version of SPAMfighter for private users.
> It has removed 4079 spam emails to date.
> Paying users do not have this message in their emails.
> Get the free SPAMfighter here: http://www.spamfighter.com/len Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12227
>
> | 
Support Us! Become a Promoter! | | Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh! | (View-All)
Members who have read this thread : 0
| | There are no names to display. | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Tools | Search | | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is On | | | | » Gurbani Jukebox | Listen to Gurbani while surfing SPN! | » Recent Discussions | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | » Books You Should Read... | | | |