+ Reply to Thread
Results 1 to 4 of 4

Help with array formulas, how to encode multiple summed series within one range of cells

  1. #1
    Registered User
    Join Date
    05-23-2017
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    2

    Help with array formulas, how to encode multiple summed series within one range of cells

    Hi,

    I have one row of 31 cells in B2:AF2 representing days of the month. Each cell's contents encode the hours within that day that a certain person worked, or was on leave, or was working on a project. I would like to encode up to 5 different types of hours within one single cell.

    For example, a single cell in this row can be "4.5 NB2 SL1.5"

    5 with no letter prefix represents "billable hours" - this person worked 4.5 hours on a project on this day.
    NB represents "non billable hours" - this person worked 2 hours non-project on this day.
    SL represents "sick leave" - this person was off sick for 1.5 hour on this day.
    AL represents "annual leave" - not entered in the cell because this person did not take any.
    UL represents "unpaid leave" - not entered in the cell because this person did not take any.

    At the end of this row, I want to have 5 cells in AH2:AL2 that each do a sum of B2:AF2, but using CSE formulas to get 5 different sums in AH2:AL2 even though they're all looking at one single array B2:AF2. I want to sum up, for the month, the billable hours in AH2, non billable hours in AI2, sick leave hours in AJ2, annual leave hours in AK2, and unpaid leave in AL2.

    What I've got is very basic and very restricted. I have only been able to sum one special hour at a time, so the cell is either a billable with no prefix, or a special hour. Also, I can't get it to account for half hours.\

    Please Login or Register  to view this content.
    I'm at my rope's end with this task. Can someone help me please? Thanks in advance.

  2. #2
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Help with array formulas, how to encode multiple summed series within one range of cel

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Help with array formulas, how to encode multiple summed series within one range of cel

    Hi,

    Why do you want to store this data in a single cell? Not only are you stacking up problems for yourself, you're making it unnecessarily complicated and restricting the sort of powerful analysis a Pivot Table can bring.
    Why not just create a normalised 2 dimensional table that has columns for

    Date
    Type of Hours ' entries here would be NB, SL,...etc,
    Number of hours


    and create a record for each unique combination so that whereas in your single cell example you have 3 types of hour, in a database proper there would be 3 row records.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    05-23-2017
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    2

    Re: Help with array formulas, how to encode multiple summed series within one range of cel

    Hi all,

    Sorry for the week's silence. Unfortunately this is how my company wants to display our data, and the same format is used across the team.

    For what it's worth, this is how our timesheet is laid out, where each row is one employee.
    Untitled.png

    I've got my formulas working for a week now:
    (For Billable) =SUM(IF(ISNUMBER(LEFT($P5:$AT5,1)+0),LEFT($P5:$AT5,IFERROR(FIND(" ",$P5:$AT5),LEN($P5:$AT5)))+0,0))
    (For NonBillable) =SUM(IFERROR(SUBSTITUTE(LEFT(MID($P5:$AT5&" ",FIND(AW$3,$P5:$AT5),255),FIND(" ",MID($P5:$AT5&" ",FIND(AW$3,$P5:$AT5),255))),AW$3,"")+0,0))+COUNTIF($P5:$AT5,AW$3)*8
    (For AL, SL, UL) =SUM(IFERROR(SUBSTITUTE(LEFT(MID($P5:$AT5&" ",FIND(AX$3,$P5:$AT5),255),FIND(" ",MID($P5:$AT5&" ",FIND(AX$3,$P5:$AT5),255))),AX$3,"")+0,0))+COUNTIF($P5:$AT5,AX$3)*8
    Last edited by stainedpillowcase; 05-29-2017 at 11:36 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Count 1 Range of Cells With Multiple Criteria From An Array
    By Matt1309 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-05-2017, 05:43 AM
  2. Get chart series from an array that has NOT been filled with a range
    By Woulter in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-25-2016, 06:32 PM
  3. Encode/Decode a byte array to/from Base64 format
    By jeff_123 in forum Excel General
    Replies: 1
    Last Post: 05-31-2014, 04:54 AM
  4. Formula Change Checker: All the Cells' formulas in a range into an Array
    By cmore in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-30-2014, 04:52 PM
  5. MIN Value of two summed columns - Array ??
    By shaunwilko in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-14-2014, 10:23 PM
  6. Replies: 14
    Last Post: 06-17-2013, 09:43 AM
  7. Replies: 4
    Last Post: 01-10-2005, 02:06 PM

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