Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How to auto sum cells if letters are in cells?

I would like to have my spreadsheet have number of hours for a shift, but
also identify which shift it is, for example:
11 ICU
10 CL
8 E
10.5 N

I need to be able to sum the hours, but also identify who is working what.
Help.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default How to auto sum cells if letters are in cells?

Hi,

Use this to sum the numbers

=SUMPRODUCT(--(TRIM(LEFT(A1:A4,FIND(" ",A1:A4)))))

to extract the letters

=TRIM(MID(A1,FIND(" ",A1),LEN(A1)))

drag down

Mike

" wrote:

I would like to have my spreadsheet have number of hours for a shift, but
also identify which shift it is, for example:
11 ICU
10 CL
8 E
10.5 N

I need to be able to sum the hours, but also identify who is working what.
Help.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default How to auto sum cells if letters are in cells?

Where is the info on who? Or am I missing something.

If the person in question is identified in column A and the hour/shift is in
column B then the formula to sum hours by shift and person would be:

=SUMPRODUCT(--(LEFT(B$1:B$100,FIND("
",B$1:B$100)-1)),--((MID(B$1:B$100,FIND("
",B$1:B$100)+1,9)=E1)),--(A$1:A$100=D1))

This assumes E1 contains the shift of the person you want totaled and D1
contains their name.

Enter the name and shifts of all the employees in columns D and E and copy
the formula down.

Another alternative would be to use the text to columns command (on the data
menu) to split the 11 ICU entries into two columns and write a simpler
formula or use a pivot table.


--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


" wrote:

I would like to have my spreadsheet have number of hours for a shift, but
also identify which shift it is, for example:
11 ICU
10 CL
8 E
10.5 N

I need to be able to sum the hours, but also identify who is working what.
Help.

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
bottom of letters getting cut off in certain cells Grd Excel Discussion (Misc queries) 1 November 14th 06 07:27 PM
How to Sum-If when the cells to sum are Auto-filter visable cells? Dennis Excel Discussion (Misc queries) 3 February 24th 06 11:49 PM
Joining letters from different cells Lance Excel Worksheet Functions 3 October 9th 05 06:05 PM
Excel Cells doesn't have letters JustAsking Excel Discussion (Misc queries) 1 July 12th 05 09:27 AM
Auto populate cells based on 2 cells division. Chance224 Excel Discussion (Misc queries) 0 April 4th 05 09:35 PM


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