+ Reply to Thread
Results 1 to 3 of 3

Calculations using "codes"

  1. #1
    Registered User
    Join Date
    12-21-2008
    Location
    Cleveland
    Posts
    2

    Calculations using "codes"

    I'm trying to create an excel spreadsheet to calculate hours for scheduling workers. The problem I'm having is that I want to use "codes" that represent different number of hours, for example, entering "P" in a cell would have a value of "12" that I can use to calculate the total number of hours worked that week.

    Attached is a sample spreadsheet. The "CODE" tab at the bottom of the worksheet is where I have the codes I want to use and the numerial representation. I need to be able to somehow get excel to translate the codes into numbers so I can then calculate in the total column.

    Any help pointing to the right direction is greatly appreciated. thanks!
    Attached Files Attached Files

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    one possible solution:

    =SUMPRODUCT(SUMIF(CODES!$A$1:$A$10,$B$3:$G$12,CODES!$B$1:$B$10))

    However you will need to ensure each entry on "Schedule" is valid "Code" - eg CL8 is not listed on CODES and will cause the above to ignore that value.

    Change ranges to suit.
    Last edited by DonkeyOte; 01-19-2009 at 05:16 AM. Reason: typo

  3. #3
    Registered User
    Join Date
    12-21-2008
    Location
    Cleveland
    Posts
    2
    Dear DonkeyOte,

    you're a genius!!! thank you very much!!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1