Excel help please

  Taurus 11:22 06 Mar 09

I would appreciate help with the following problem with an Excel worksheet I am working on. Column Z is a column of numbers representing hours absent from work for any of 3 different reasons, column X contains alfa codes for the reason; A/L for annual leave, S for sickness and S/D for study time. I need to extract from col Z the hours relating only to annual leave to enable entitlement calculations to be made. Any help would be much appreciated. Thank you.

  howard64 11:41 06 Mar 09

my guess is that you are looking at this from the wrong angle. I would have a column for each reason and then once all your hours in column a/l have been entered all you need is to add them.

  Simsy 11:45 06 Mar 09

on the detail of your layout, but on the face of it it sounds like what you need is the "SUMIF" function.

Check it out via Excel help, and come back if that doesn't get you sorted.

Good luck,



  Taurus 11:52 06 Mar 09

Thanks howard64, (sigh)if only life was that simple. I'll check out Simsy's 'SUMIF' and repost.

  MAJ 12:04 06 Mar 09

Assuming you're adding all the values together, you would use the SUMIF function.

If Column X is X1:X10 and Column Z is Z1:Z10, then the formula would be:


  Taurus 12:04 06 Mar 09

Thank you Simsy, SUMIF was just what I needed. In my instance the formula
=SUMIF(X3:X33,"A/L",Z3:Z33)did exactly what I wanted. Thanks again.

  Taurus 12:07 06 Mar 09

Sorry MAJ I posted the above before I saw your post, as you can see from my post you were spot on, many thanks to you for your post. (Did I just say post?)

  Picklefactory 12:28 06 Mar 09

No, you said spot
"you were spot on" must have been a typo


This thread is now locked and can not be replied to.

Sony Xperia XZ Premium review: Hands-on with the new 4K HDR phone with Motion Eye camera and Snapdr5…

1995-2015: How technology has changed the world in 20 years

Best laptop for design and art 2017: we test Apple, Dell, HP, Lenovo and Microsoft's best models…

CarPlay tips & troubleshooting guide: CarPlay tips & troubleshooting guide: Get the most from…