Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
SociologyStudent
 
Posts: n/a
Default Relating text to a value

Can I relate text to a number so I can sum a string of text? I'm trying to
create a work schedule and ensure each employee is working 32.00 hours per
week.
Example:
F12 G12 H12 I12 J12 K12 L12 M12
Katrina Harris X X D D D/E D X (sum of F12:L12)

X = off or 0.00
D/E = 15
D = 7.5

M12 should equal 37.5



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
 
Posts: n/a
Default Relating text to a value

D+D+D is 45 + 7.5 is 52.5 not 37.5
to me it looks like the values in F12:L12 are

X, X, D, D, D/E, D, X

not so?

anyway this will work

=SUMPRODUCT(COUNTIF(F12:L12,{"X";"D";"D/E"}),{0;15;7.5})

--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com


"SociologyStudent" wrote in
message ...
Can I relate text to a number so I can sum a string of text? I'm trying to
create a work schedule and ensure each employee is working 32.00 hours per
week.
Example:
F12 G12 H12 I12 J12 K12 L12 M12
Katrina Harris X X D D D/E D X (sum of
F12:L12)

X = off or 0.00
D/E = 15
D = 7.5

M12 should equal 37.5





  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Brian Taylor
 
Posts: n/a
Default Relating text to a value

=COUNTIF(F12:L12,"D")*7.5+COUNTIF(F12:L12,"D/E")*15

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Barb Reinhardt
 
Posts: n/a
Default Relating text to a value

Try

=COUNTIF(F12:L12,"X")*0+COUNTIF(F12:L12,"D")*7.5+C OUNTIF(F12:L12,"D/E")*15

The first part really isn't needed, but if you want to change the X to be
something besides 0, you can just change the 0 value.

"SociologyStudent" wrote:

Can I relate text to a number so I can sum a string of text? I'm trying to
create a work schedule and ensure each employee is working 32.00 hours per
week.
Example:
F12 G12 H12 I12 J12 K12 L12 M12
Katrina Harris X X D D D/E D X (sum of F12:L12)

X = off or 0.00
D/E = 15
D = 7.5

M12 should equal 37.5



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Brian Taylor
 
Posts: n/a
Default Relating text to a value

Peo,

D = 7.5 and D/E = 15. I think you got it backwards. But I like your
formula. Pretty slick: a sumproduct, countif, and two arrays. You are
my hero.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
SociologyStudent
 
Posts: n/a
Default Relating text to a value

You are correct Mr. Taylor. Thank you for clarifying for me. You all were
very helpful. Thanks!

"Brian Taylor" wrote:

Peo,

D = 7.5 and D/E = 15. I think you got it backwards. But I like your
formula. Pretty slick: a sumproduct, countif, and two arrays. You are
my hero.


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
extra help with transpose Raymond75 Excel Discussion (Misc queries) 0 January 12th 06 03:40 PM
Shade cell according to text? Ltat42a Excel Discussion (Misc queries) 0 January 3rd 06 06:37 PM
Using Concatenate function to generate text in Text Box Mary S. Charts and Charting in Excel 1 December 14th 05 08:55 PM
SUMPRODUCT vs Text??? Ken Excel Worksheet Functions 2 April 9th 05 07:21 PM
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM


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