+ Reply to Thread
Results 1 to 11 of 11

How to correct formula

  1. #1
    Forum Contributor
    Join Date
    01-21-2010
    Location
    Chicago,Illinois
    MS-Off Ver
    Excel 2019
    Posts
    206

    How to correct formula

    I have a problem ending this formula correctly. Can anyone find the error in this formula. L11 has the formula below in it. labeling Example.xls
    =(N(NOT(ISNA(MATCH(F11,$U$4:$U$9,0))))*0+N(NOT(ISNA(MATCH(F11,$V$4:$V$9,0))))*1+N(NOT(ISNA(MATCH(F11,$W$4:$W$9,0))))*2+N(NOT(ISNA(MATCH(F11,$X$4:$X$9,0))))*3+N(NOT(ISNA(MATCH(F11,$Y$4:$Y$9,0))))*4+N(NOT(ISNA(MATCH(F11,$Z$4:$Z$9))))*5+N(NOT(ISNA(MATCH(F11,$AA$4:$AA$9,0))))*6+N(NOT(ISNA(MATCH(F11,$AB$4:$AB$9,0))))*7+N(NOT(ISNA(MATCH(F11,$AC$4:$AC$9,0))))*8+N(NOT(ISNA(MATCH(F11,$AD$4:$AD$9,0))))*9+N(NOT(ISNA(MATCH(RIGHT(F11,1)&LEFT(F11,1),$U$4:$U$9,0))))*0+N(NOT(ISNA(MATCH(RIGHT(F11,1)&LEFT(F11,1),$V$4:$V$9,0))))*1+N(NOT(ISNA(MATCH(RIGHT(F11,1)&LEFT(F11,1),$W$4:$W$9,0))))*2+N(NOT(ISNA(MATCH(RIGHT(F11,1)&LEFT(F11,1),$X$4:$X$9,0))))*3+N(NOT(ISNA(MATCH(RIGHT(F11,1)&LEFT(F11,1),$Y$4:$Y$9,0))))*4+N(NOT(ISNA(MATCH(RIGHT(F11,1)&LEFT(F11,1),$Z$4:$Z$9,0))))*5+N(NOT(ISNA(MATCH(RIGHT(F11,1)&LEFT(F11,1),$AA$4:$AA$9,0))))*6+N(NOT(ISNA(MATCH(RIGHT(F11,1)&LEFT(F11,1),$AB$4:$AB$9,0))))*7+N(NOT(ISNA(MATCH(RIGHT(F11,1)&LEFT(F11,1),$AC$4:$AC$9,0))))*8+N(NOT(ISNA(MATCH(RIGHT(F11,1)&LEFT(F11,1),$AD$4:$AD$9,0))))*9+N/IF(LEFT(F11,1)=RIGHT(F11,1),2,1))
    Last edited by Jordans121; 07-24-2013 at 07:25 PM.

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

    Re: How to correct formula

    Are you getting an actual error or just the wrong result? What result do you expect?

    Seems to me you can probably use a much shorter formula...but I don't understand the purpose of using RIGHT(F11,1)&LEFT(F11,1), isn't that just the same as F11 when F11 has 2 characters.....or are you expecting a different number of characters?
    Audere est facere

  3. #3
    Forum Contributor
    Join Date
    01-21-2010
    Location
    Chicago,Illinois
    MS-Off Ver
    Excel 2019
    Posts
    206

    Re: How to correct formula

    I'm getting the wrong result for L11. Back pair 07 (in H11) can be found in the column (AB) labeled 7 so the result should be 7.

  4. #4
    Forum Contributor
    Join Date
    01-21-2010
    Location
    Chicago,Illinois
    MS-Off Ver
    Excel 2019
    Posts
    206

    Re: How to correct formula

    I do not understand what you mean...I'm simply trying to match the pairs in columns F,G,H to the corresponding chart shown in columns U through AD and return the number (with the blue background) on the first row of columns U through AD. The formula would be placed in columns J,K,and L.

    I suppose a =VLOOKUP formula can be used but I do not know how to use it.
    Last edited by Jordans121; 07-24-2013 at 06:33 PM.

  5. #5
    Registered User
    Join Date
    07-19-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    92

    Re: How to correct formula

    No clue what you are trying to do here.

    Noticed that the formula in L11 does not look like the formulae above and below in that it used F11 instead of H11 (H11 would appear to fit the pattern)

  6. #6
    Registered User
    Join Date
    07-19-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    92

    Re: How to correct formula

    Quote Originally Posted by Jordans121 View Post
    I'm simply trying to match the pairs in columns F,G,H to the corresponding chart
    The pairs? They look like numbers to me - can you not treat them as such? Will they always be two digits?

  7. #7
    Forum Contributor
    Join Date
    01-21-2010
    Location
    Chicago,Illinois
    MS-Off Ver
    Excel 2019
    Posts
    206

    Re: How to correct formula

    You are correct. I changed F11 to H11 but it is still not returning the correct value. if you look at L11 you will see the number 12 instead of the number 7. if you look at H11 and match its cell contents to the chart (columns U:AD) you will see that07 should be labeled 7.

    There is only one number (a number 0-9)that will show up for the formula. Pairs are always two digits. I don't understand what you are asking.

    Note:I want use the numbers at the top of the chart as "labels" or "titles". PLEASE SEE THE ATTACHMENT.labeling Example.xls
    Attached Files Attached Files
    Last edited by Jordans121; 07-24-2013 at 06:57 PM.

  8. #8
    Registered User
    Join Date
    07-19-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    92

    Re: How to correct formula

    You go thru great pains to treat the left and right side of the pair separately. Why? What is your goal?

    I don't understand what you are asking.
    I don't think you've educated us enough to offer any useful advice. Why not take us thru the algorithm that you want to occur?

  9. #9
    Forum Contributor
    Join Date
    01-21-2010
    Location
    Chicago,Illinois
    MS-Off Ver
    Excel 2019
    Posts
    206

    Re: How to correct formula

    I did not do this formula. someone else did it for me. there is no reason to separate the left from the right. I just want a formula to match and return.

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

    Re: How to correct formula

    The reason you are getting the wrong result is because the MATCH function for *5 is missing the 3rd argument, should be like this

    N(NOT(ISNA(MATCH(H11,$Z$4:$Z$9,0))))*5

    but for a shorter formula you can use this to replace the whole thing

    =SUMPRODUCT(($U$4:$AD$9=H11)*$U$1:$AD$1)

  11. #11
    Forum Contributor
    Join Date
    01-21-2010
    Location
    Chicago,Illinois
    MS-Off Ver
    Excel 2019
    Posts
    206

    Re: How to correct formula

    Thanks alot daddylonglegs. +Rep

+ 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. Replies: 7
    Last Post: 02-03-2013, 06:25 PM
  2. Replies: 1
    Last Post: 09-17-2012, 09:35 AM
  3. Fix Needed for Code to Send Correct Data to Correct Sheets
    By swordswinger710 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-04-2012, 03:53 PM
  4. Formula Result in Formula Box is Correct, Cell Shows 0
    By TheStolenOlive in forum Excel General
    Replies: 1
    Last Post: 08-05-2011, 03:16 PM
  5. Replies: 3
    Last Post: 05-17-2008, 05:25 AM

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