+ Reply to Thread
Results 1 to 5 of 5

Formula needed for If/then capturing Heading Title and Value

  1. #1
    Registered User
    Join Date
    04-21-2013
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2007
    Posts
    27

    Formula needed for If/then capturing Heading Title and Value

    I am in need of help to write a formula to capture not only a result from a If/Then statement but also a corresponding value that triggered the If/Then result. For example, see the attachment to show what is needed. For column E, is there a formula that can produce the same result if the values in each column are greater than 0 respectively? Thank you!
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,726

    Re: Formula needed for If/then capturing Heading Title and Value

    You can use this in E2:

    =SUBSTITUTE(IF(A2>0,LEFT(A$1,5)&A2&", ","")&IF(B2>0,LEFT(B$1,4)&B2&", ","")&IF(C2>0,LEFT(C$1,3)&C2&", ","")&IF(D2>0,LEFT(D$1,3)&D2&", ","")&",",", ,","")

    I'm not sure if you wanted the same for column D - if not, then omit the part in red above.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    04-21-2013
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Formula needed for If/then capturing Heading Title and Value

    Pete, thanks for that formula. I inserted it and I am getting the error message that "You've entered too few arguments for this function."

    Any thoughts?

    Thanks!

    Josh

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,726

    Re: Formula needed for If/then capturing Heading Title and Value

    I've attached the file that I tested it on (although I put the formula in G2).

    Hope this helps.

    Pete
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    04-21-2013
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Formula needed for If/then capturing Heading Title and Value

    Thanks Pete, I really appreciate the help on this one...that worked!

+ 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