Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default If/ then question

I have written a time sheet for our employees to keep
track of their time. The file keeps a running total of
annual leave. I've written three files, one for each
leave category, which is either 8, 6, or 4. The pertinent
formula looks like this: =X2-X3+TIME(8,0,0); =X2-X3+TIME
(6,0,0) or =X2-X3+TIME(4,0,0).

Is there an if/ then statement where the employees can
enter in another cell 8, 6, or 4 and the correct formula
would be used? That being possible, only one time sheet
would be needed. And if an employee would change leave
category, he could easily correct his leave tally.

Thank you for your help!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default If/ then question

Sure! Let's say you have them put the category in cell Y2:

=X2-X3+TIME(Y2,0,0);

Let me know if that doesn't work or if I misunderstood.

Mark
---
Mark Bigelow
mjbigelow at hotmail dot com
http://hm.imperialoiltx.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default If/ then question

Thanks, Mark! It worked like a champ! There's one item I
still need help with. On the last pay period (or the
last work sheet), those in the 6 hour category earn 10
hours, not 6. Is there a way to insert an if/then so that
if y2=6 ,the formula will be =x2-x3+ time(10,0,0)? All
other categories will still fit into the original formula.

Thanks for your help.

Ellen
-----Original Message-----
Sure! Let's say you have them put the category in cell

Y2:

=X2-X3+TIME(Y2,0,0);

Let me know if that doesn't work or if I misunderstood.

Mark
---
Mark Bigelow
mjbigelow at hotmail dot com
http://hm.imperialoiltx.com

*** Sent via Developersdex http://www.developersdex.com

***
Don't just participate in USENET...get rewarded for it!
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default If/ then question

Hello Mark,
In a reply note I wrote:
Thanks, Mark! It worked like a champ! There's one item I
still need help with. On the last pay period (or the
last work sheet), those in the 6 hour category earn 10
hours, not 6. Is there a way to insert an if/then so that
if y2=6 ,the formula will be =x2-x3+ time(10,0,0)? All
other categories will still fit into the original formula.

Well, I've answered my own question. This formula will
work for the final pay period, or last worksheet:

=X2-X3+TIME(IF(Y2=6,Y2+4,Y2),0,0)


Thanks, again.
Psalm 23

Ellen

-----Original Message-----
Sure! Let's say you have them put the category in cell

Y2:

=X2-X3+TIME(Y2,0,0);

Let me know if that doesn't work or if I misunderstood.

Mark
---
Mark Bigelow
mjbigelow at hotmail dot com
http://hm.imperialoiltx.com

*** Sent via Developersdex http://www.developersdex.com

***
Don't just participate in USENET...get rewarded for it!
.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 Macro/VB Question DDE Question MadDog22 Excel Worksheet Functions 1 March 10th 10 01:47 AM
another question EJV Excel Worksheet Functions 7 January 28th 09 11:58 PM
where can I see my question and answer? Yesterday I ask a question IP Excel Discussion (Misc queries) 2 May 10th 08 04:08 PM
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM
The question is an excel question that I need to figure out howto do in excel. Terry Excel Worksheet Functions 3 January 23rd 06 06:22 PM


All times are GMT +1. The time now is 08:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"