+ Reply to Thread
Results 1 to 10 of 10

If function not working

  1. #1
    Registered User
    Join Date
    08-20-2018
    Location
    Texas
    MS-Off Ver
    Office 365
    Posts
    52

    If function not working

    I am trying to populate cells P, Q, R by:

    1) Looking at the numbers in cells C, D, E to see if they match V1:AAE numbers.

    2) If a match is found, the number above the match is entered into P, Q, R

    3) If the number above has a # sign, DD, or TTT in the cell, I want a zero (0).

    4) I don’t want to see #, DD, or TTT. I want to see only a zero.

    5) Below is the code:
    =IF(C4=$V$1, $V3, IF(C4=$W$1, $W3, IF(C4=$X$1, $X3, IF(C4=$Y$1, $Y3, IF(C4=$Z$1, $Z3, IF(C4=$AA$1, $AA3, IF(C4=$AB$1, $AB3, IF(C4=$AC$1, $AC3, IF(C4=$AD$1, $AD3, IF(C4=$AE$1, $AE3))))))))))
    6) When I enter: =IF(V2="#", "0", V2) it works. But I can’t get it to work in the above code.

    Help, please!

  2. #2
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: If function not working

    Can you attach a sample workbook showing your mocked-up results.

    Go Advanced -> Manage Attachments -> Upload

  3. #3
    Registered User
    Join Date
    08-20-2018
    Location
    Texas
    MS-Off Ver
    Office 365
    Posts
    52

    Re: If function not working

    Okay, here it is.
    Attached Files Attached Files

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: If function not working

    Try this as a starter in C4 copied across and down:

    =SUBSTITUTE(INDEX($V3:$AE3,MATCH(C4,$V$1:$AE$1,0)),"#",0)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    08-20-2018
    Location
    Texas
    MS-Off Ver
    Office 365
    Posts
    52

    Re: If function not working

    Thanks it is working for the # sign.

    But, I don’t want to see #, DD, or TTT. I want to see only a zero. I changed the code to:

    =SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(INDEX($V2:$AE2,MATCH(C3,$V$1:$AE$1,0)),"#", 0), "DD", "0"), "TTT", "0")

    it seems to be working. Did I do this correctly?
    Last edited by lmcc007; 08-21-2018 at 04:29 PM.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: If function not working

    Looks like it, except you don’t want the zeroes in inverted commas or they will be returned as text instead of numbers.

    I did say that the formula was a starting point. I’m glad you worked out how to adapt it.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  7. #7
    Valued Forum Contributor jtakw's Avatar
    Join Date
    05-05-2018
    Location
    CA, USA
    MS-Off Ver
    2016
    Posts
    668

    Re: If function not working

    Hi,

    If you Only want numeric results from the "match", and if Any Text is returned, you just want 0 (zero), you can do this instead of SUBSTITUTEs:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    08-20-2018
    Location
    Texas
    MS-Off Ver
    Office 365
    Posts
    52

    Re: If function not working

    Perfect, thanks a lot!

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: If function not working

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  10. #10
    Valued Forum Contributor jtakw's Avatar
    Join Date
    05-05-2018
    Location
    CA, USA
    MS-Off Ver
    2016
    Posts
    668

    Re: If function not working

    If you found my post #7 above helpful, add rep would be appreciated.

    Click the "Star" at lower left corner of posts you found helpful, Thank you.

+ 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. How to combine the WORKDAY function with an IF function to build a working Gantt chart.
    By roomaggoo in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 2
    Last Post: 07-07-2018, 11:54 AM
  2. Replies: 0
    Last Post: 07-07-2018, 04:13 AM
  3. [SOLVED] SUM/COUNTA Function Not Working On Cell Data Generated from SUM Function
    By pexeterblue43 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-15-2018, 03:47 PM
  4. Replies: 1
    Last Post: 06-02-2015, 01:38 AM
  5. IF statement not working with text function and edate function.
    By joshnathan in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-04-2013, 10:26 AM
  6. [SOLVED] Using the Split function with another function incorporated is not working correctly
    By highlystrung in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-06-2013, 03:51 PM
  7. Working with Arrays, pasing from function to function
    By mikebres in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-27-2006, 01:40 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