#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
dtmd
 
Posts: n/a
Default IF formula

I have a spreadsheet (timesheet) that has a column (F) defaulted to 8. I
need this row to subtract the numbers entered into rows G, M-U only. For
instance - the 8 is regular hours (Column F). If someone takes 8 hours of
Sick leave (column O) - I want the 8 in the Column F to go to zero. If they
took 3 hours, I want it to go to 5 hours. The other tricky part is that if
they took 4 hours of Leave Sick (column O) and 4 hours of Leave Annual
(Column M) - both those amounts should be deducted from Column F. Any
suggestions would be great!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
goober
 
Posts: n/a
Default IF formula


=SUM(8-(G10+M10+N10+O10+P10+Q10+R10+S10+T10+U10))
Should do what you want.


=SUM(8-SUM(G10,M10:U10))
Does the same thing only using arrays.

This will also give you a negative if the numbers entered exceed 8.

Hope it helps.


--
goober
------------------------------------------------------------------------
goober's Profile: http://www.excelforum.com/member.php...o&userid=19838
View this thread: http://www.excelforum.com/showthread...hreadid=485937

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default IF formula

=F2-G2-SUM(M2:U2)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"dtmd" wrote in message
...
I have a spreadsheet (timesheet) that has a column (F) defaulted to 8. I
need this row to subtract the numbers entered into rows G, M-U only. For
instance - the 8 is regular hours (Column F). If someone takes 8 hours of
Sick leave (column O) - I want the 8 in the Column F to go to zero. If

they
took 3 hours, I want it to go to 5 hours. The other tricky part is that

if
they took 4 hours of Leave Sick (column O) and 4 hours of Leave Annual
(Column M) - both those amounts should be deducted from Column F. Any
suggestions would be great!



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
dtmd
 
Posts: n/a
Default IF formula

Thank you so much! That did the trick.

"goober" wrote:


=SUM(8-(G10+M10+N10+O10+P10+Q10+R10+S10+T10+U10))
Should do what you want.


=SUM(8-SUM(G10,M10:U10))
Does the same thing only using arrays.

This will also give you a negative if the numbers entered exceed 8.

Hope it helps.


--
goober
------------------------------------------------------------------------
goober's Profile: http://www.excelforum.com/member.php...o&userid=19838
View this thread: http://www.excelforum.com/showthread...hreadid=485937


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
goober
 
Posts: n/a
Default IF formula


You're welcome.


--
goober
------------------------------------------------------------------------
goober's Profile: http://www.excelforum.com/member.php...o&userid=19838
View this thread: http://www.excelforum.com/showthread...hreadid=485937

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
IF formula? meris Excel Worksheet Functions 1 September 6th 05 07:14 AM
writing a formula for a colored value aaronwexler New Users to Excel 11 September 1st 05 03:11 PM
referencing named formula using INDIRECT function [email protected] Excel Worksheet Functions 19 May 11th 05 09:48 AM
Simplify formula Luke Excel Worksheet Functions 37 May 6th 05 07:21 AM
Match / Vlookup within an Array formula Hari Prasadh Excel Discussion (Misc queries) 3 February 3rd 05 04:37 PM


All times are GMT +1. The time now is 05:06 PM.

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"