Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / May 2008

Tip: Looking for answers? Try searching our database.

Show dates based on criteria

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
slaga - 06 May 2008 23:17 GMT
In Row T6 I enter the first day of the pay week (Sunday) in the form
5/4/2008
it appears as May 4 2008

Then In row D13 the last day of the pay week(Saturday) then appears as
May 10 2008
In this cell  I have the formula  
=IF(T6=**,**,IF(WEEKDAY(T6)=7,T6,IF(WEEKDAY(T6)=6,T6+1,IF(WEEKDAY(T6)=5,T6+2,IF(WEEKDAY(T6)=4,T6+3,IF(WEEKDAY(T6)=3,T6+4,IF(WEEKDAY(T6)=2,T6+5,T6+6))))))))

Currently G8 Says Monday G9 Tuesday, G10 Wednesday, G11 Thursday, G12
Friday

I would now like Mondays row to give the date
Monday May 5 2008, Tuesday May 6 2008 and so on... all based on the
original date entered in T6

Is This possible?

thanks

Sean

Signature

slaga

T. Valko - 07 May 2008 03:26 GMT
It's not real clear what you're trying to do.

However:

> =IF(T6=**,**,IF(WEEKDAY(T6)=7,T6,IF(WEEKDAY(T6)=6,T6+1,IF(WEEKDAY(T6)=5,T6+2,IF(WEEKDAY(T6)=4,T6+3,IF(WEEKDAY(T6)=3,T6+4,IF(WEEKDAY(T6)=2,T6+5,T6+6))))))))

You can replace that formula with this one:

=IF(T6="**","**",T6+CHOOSE(WEEKDAY(T6),6,5,4,3,2,1,0))

Not sure what your intentions are with the =IF(T6=**,**, part but you need
to enclose those ** in quotes.

Signature

Biff
Microsoft Excel MVP

> In Row T6 I enter the first day of the pay week (Sunday) in the form
> 5/4/2008
[quoted text clipped - 17 lines]
>
> Sean
slaga - 07 May 2008 14:03 GMT
I am embarassed to say that I hadent had my glasses on and that what
had thought were * 's...were " 's.... clearly was getting towards th
end of the work shift lol

thanks very much for your help, this new formula is far more concise
it helps alot.

What I would like to do is extend this to acheive my goal. I will tr
to better explain what I am trying to acomplish.

I am making changes to our companys time sheets.
The User enters into T6 the date
in D13 I now have your formula which shows the date for the pay week
end

=IF(T6="**","**",T6+CHOOSE(WEEKDAY(T6),6,5,4,3,2,1,0))

which based on t6 currently reads Saturday May 10 2008

Now Each work day the worker must enter the job number they worked on
and the amount of hours they worked at each job.
so row G is the headings for the days of the week (Monday in G8
Tuesday in G9...Friday in G12)

What I would like to do with these headings is such that when the use
enters the date in T6,  
g8 will ready "Monday May 5th 2008" Tuesday May 6th 2008" and so on.

I am assuming I will just need to make a change of some sort to th
formula you provided me with last time.

Thanks again for the help,
Sea

--
slaga
T. Valko - 07 May 2008 18:26 GMT
>what I had thought were * 's...were " 's....

So, you were probably thinking this:

If T6 is blank, return blank...

=IF(T6="","",T6+CHOOSE(WEEKDAY(T6),6,5,4,3,2,1,0))

Ok, we can probably figure out how to get those dates posted but I need a
better understanding.

The user enters a date in T6 and D13 *always* calculates the Saturday date
of the week based on T6.

In G8:G12 you want the dates for Monday thru Friday of the *same* week as
the date in D13?

So, lets assume D13 = 9/13/2008 (Saturday). Are these the dates that should
be posted to G8:G12 -

G8 = 9/8/25008 (Monday)
G9 = 9/9/2008 (Tuesday)
G10 = 9/10/2008 (Wednesday)
G11 = 9/11/2008 (Thursday)
G12 = 9/12/2008 (Friday)

If those are the correct dates enter this formula in G8 and copy down to
G12:

=IF(D$13="","",D$13-WEEKDAY(D$13,2)+ROWS(G$8:G8))

Format in DATE style of your choice.

Signature

Biff
Microsoft Excel MVP

> I am embarassed to say that I hadent had my glasses on and that what I
> had thought were * 's...were " 's.... clearly was getting towards the
[quoted text clipped - 29 lines]
> Thanks again for the help,
> Sean
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.