Taurus 11:22 06 Mar 2009
Locked

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 2009

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 2009

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,

Regards,

Simsy

Taurus 11:52 06 Mar 2009

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

MAJ 12:04 06 Mar 2009

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:

=SUMIF(X1:X10,"A/L",Z1:Z10)

Taurus 12:04 06 Mar 2009

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.
Dave

Taurus 12:07 06 Mar 2009

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 2009

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

:o)

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

Elsewhere on IDG sites

Honor 9 Lite review

18 Best Adult Colouring In Books 2018

HomePod review

Les meilleures séries Netflix (2018)