+ Reply to Thread
Results 1 to 4 of 4

Help with existing array formula

  1. #1
    Forum Contributor
    Join Date
    07-15-2011
    Location
    Whitby, Canada
    MS-Off Ver
    Excel 2010
    Posts
    121

    Help with existing array formula

    I am using the formula below in a payroll spreadsheet (I was given A LOT of help by an awesome power user/moderator on this site) and I need it to be tweaked a little, but am not sure how to do it.

    Currently it is designed to look at an entry like "15 OT" and return the number 15 (J2 being the cell containing the reference to look for (OT)). I would like the formula to allow for finding another code in the reference cell as well.

    Ex. If the cell contains "15 OT STAT", return the number 15 when searching for OT, as well as searching for STAT

    Currently it will only return the number 15 if I am searching for the first 'chunk' of my payroll code (the OT, but not the STAT)


    Please Login or Register  to view this content.
    Any help would be greatly appreciated!
    Last edited by Greed; 09-15-2011 at 02:17 PM. Reason: Solved

  2. #2
    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 existing array formula

    Hi,

    Please upload your workbook so that we can see the request in context. In addition show an example of what you expect the result to be.

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

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Help with existing array formula

    Assuming only 1 or 2 digit numbers.......always at the start then perhaps try this formula

    =SUM(IF(ISNUMBER(FIND(" "&J$2&" "," "&$C5:$I5&" ")),LEFT($C5:$I5,2)+0))

    confirmed with CTRL+SHIFT+ENTER

    If numbers might be larger change to this

    =SUM(IF(ISNUMBER(FIND(" "&J$2&" "," "&$C5:$I5&" ")),LEFT($C5:$I5,FIND(" ",$C5:$I5)-1)+0))
    Audere est facere

  4. #4
    Forum Contributor
    Join Date
    07-15-2011
    Location
    Whitby, Canada
    MS-Off Ver
    Excel 2010
    Posts
    121

    Re: Help with existing array formula

    Great - works a trick! Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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