Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
mgarcia
 
Posts: n/a
Default Need help w/ formula to sum time worked based on two values...


I have 4 drivers each with a user ID unique to them (ex: AA12345) each
of these drivers does a work function of inventoring items which shows
as either "INVEN01" or "INVEN02" on my report. "J" column for ID and
"M" column for function code, then in column "S" is the time spent on
that function. I would like to create a formula to Sum the time for
each driver on function INVEN01 and INVEN02. I tired coming up with
something for just for INVEN01 first - figuring I could do the same for
INVEN02 and add them together. I got this:

SUM(IF((YMS_TEST.xls!$J$2:$J$8000=AA12345)+(YMS_TE ST.xls!$M$2:$M$8000="INVEN01"),YMS_TEST.xls!$S$2:$ S$8000,0))

YMS_Test.XLS is the file my report comes out in. B4 refers to the
drivers ID. I thought this would reference the file and only sum the
time for rows were the ID and function were AA12345+INVEN01, but
instead I got rows added were the ID matched plus rows were the
function matched. Is there a way to make the system check both?

Thanks!


--
mgarcia
------------------------------------------------------------------------
mgarcia's Profile: http://www.excelforum.com/member.php...o&userid=30584
View this thread: http://www.excelforum.com/showthread...hreadid=509188

  #2   Report Post  
Posted to microsoft.public.excel.misc
Kevin Vaughn
 
Posts: n/a
Default Need help w/ formula to sum time worked based on two values...

I haven't tested your formula, but from reading your description, try
changing the + to an *. Basically, you use + when you want an "or" and *
when you want "and" and from your description, it seems you want "and". So
your new formula would be:

SUM(IF((YMS_TEST.xls!$J$2:$J$8000=AA12345)*(YMS_TE ST.xls!$M$2:$M$8000="INVEN01"),YMS_TEST.xls!$S$2:$ S$8000,0))

--
Kevin Vaughn


"mgarcia" wrote:


I have 4 drivers each with a user ID unique to them (ex: AA12345) each
of these drivers does a work function of inventoring items which shows
as either "INVEN01" or "INVEN02" on my report. "J" column for ID and
"M" column for function code, then in column "S" is the time spent on
that function. I would like to create a formula to Sum the time for
each driver on function INVEN01 and INVEN02. I tired coming up with
something for just for INVEN01 first - figuring I could do the same for
INVEN02 and add them together. I got this:

SUM(IF((YMS_TEST.xls!$J$2:$J$8000=AA12345)+(YMS_TE ST.xls!$M$2:$M$8000="INVEN01"),YMS_TEST.xls!$S$2:$ S$8000,0))

YMS_Test.XLS is the file my report comes out in. B4 refers to the
drivers ID. I thought this would reference the file and only sum the
time for rows were the ID and function were AA12345+INVEN01, but
instead I got rows added were the ID matched plus rows were the
function matched. Is there a way to make the system check both?

Thanks!


--
mgarcia
------------------------------------------------------------------------
mgarcia's Profile: http://www.excelforum.com/member.php...o&userid=30584
View this thread: http://www.excelforum.com/showthread...hreadid=509188


  #3   Report Post  
Posted to microsoft.public.excel.misc
mgarcia
 
Posts: n/a
Default Need help w/ formula to sum time worked based on two values...


Thanks for the help! I worked on this for a couple horus last night and
figured out the "+" was incorrect. The "*" did the trick.

Thanks!


--
mgarcia
------------------------------------------------------------------------
mgarcia's Profile: http://www.excelforum.com/member.php...o&userid=30584
View this thread: http://www.excelforum.com/showthread...hreadid=509188

  #4   Report Post  
Posted to microsoft.public.excel.misc
Kevin Vaughn
 
Posts: n/a
Default Need help w/ formula to sum time worked based on two values...

Glad you got it working.
--
Kevin Vaughn


"mgarcia" wrote:


Thanks for the help! I worked on this for a couple horus last night and
figured out the "+" was incorrect. The "*" did the trick.

Thanks!


--
mgarcia
------------------------------------------------------------------------
mgarcia's Profile: http://www.excelforum.com/member.php...o&userid=30584
View this thread: http://www.excelforum.com/showthread...hreadid=509188


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
Formula for a time card skateblade Excel Worksheet Functions 6 November 2nd 05 09:28 PM
Excel formula for a time sheet HRMSN Excel Worksheet Functions 1 August 10th 05 03:07 PM
SUMIF where values to be summed are formula Zakynthos Excel Worksheet Functions 10 July 27th 05 04:05 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM
I need help with a formula calculating time Mark Excel Discussion (Misc queries) 2 April 27th 05 10:31 AM


All times are GMT +1. The time now is 09:47 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"