+ Reply to Thread
Results 1 to 7 of 7

Joining to formula not given expected result

  1. #1
    Forum Contributor
    Join Date
    05-30-2015
    Location
    Dubai
    MS-Off Ver
    Excel 2016 Mac & PC & 365
    Posts
    633

    Joining to formula not given expected result

    Hi,

    My question has two parts....

    Both
    Please Login or Register  to view this content.
    and
    Please Login or Register  to view this content.
    Return my expected results, why cant I multiply the 2
    Please Login or Register  to view this content.
    And there must be a short and better way of writing the 2nd formula

    Thanks
    Kevin

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Joining to formula not given expected result

    First of all you're multiplying the VLOOKUP by the last COUNTIFS ONLY

    You need to put ALL of the COUNTIFs within brackets.

    =(COUNTIFS(G6,">=8",G6,"<>*m*")+COUNTIFS(I6,">=8",I6,"<>*m*")+COUNTIFS(K6,">=8",K6,"<>*m*")+COUNTIFS(M6,">=8",M6,"<>*m*")+COUNTIFS(O6,">=8",O6,"<>*m*")+COUNTIFS(Q6,">=8",Q6,"<>*m*")+COUNTIFS(S6,">=8",S6,"<>*m*"))*VLOOKUP(C6,Names[[Name]:[Travel]],6,0)

    What result are you getting, you haven't said, you're just implying it can't be done?
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Contributor
    Join Date
    05-30-2015
    Location
    Dubai
    MS-Off Ver
    Excel 2016 Mac & PC & 365
    Posts
    633

    Re: Joining to formula not given expected result

    Thanks for looking, I understood I was only multiplying the VLOOKUP by the last COUNTIFS.
    The brackets did the trick.....I did try that but had them in the wrong place....Not a good day today.

    Any way to shorten the Countifs?

    Thanks
    Kevin

  4. #4
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Joining to formula not given expected result

    Dunno why I didnt spot this before.
    Why are using COUNTIFS on an individual cell? The result can only be 1 or 0.
    Is it because it allows you to enter wild cards?

    Only way i can see is

    =((G6>=8)*(ISNUMBER(SEARCH("m",G6)))+(I6>=8)*(ISNUMBER(SEARCH("m",I6)))+(K6>=8)*(ISNUMBER(SEARCH("m",K6)))+(M6>=8)*(ISNUMBER(SEARCH("m",M6)))+(O6>=8)*(ISNUMBER(SEARCH("m",O6)))+(Q6>=8)*(ISNUMBER(SEARCH("m",Q6)))+(S6>=8)*(ISNUMBER(SEARCH("m",S6))))*VLOOKUP(C6,Names[[Name]:[Travel]],6,0)

    Wondering if a SUMPRODUCT will work...

  5. #5
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Joining to formula not given expected result

    I'm now unsure sure that above formula will work...

  6. #6
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Joining to formula not given expected result

    Try

    =SUMPRODUCT((G6:S6>=8)*(MOD(COLUMN(G6:S6),2)=1)*(ISNUMBER(SEARCH("m",G6:S6))))*VLOOKUP(C6,Names[[Name]:[Travel]],6,0)

    SUMPRODUCT seems to work on some test data, (entering 9 and 9m into G6:S6 produced correct results)

    The MOD() is there so we only extract data from odd numbered columns in G6:S6, ie columns G I K M O Q S

  7. #7
    Forum Contributor
    Join Date
    05-30-2015
    Location
    Dubai
    MS-Off Ver
    Excel 2016 Mac & PC & 365
    Posts
    633

    Re: Joining to formula not given expected result

    Thanks again for looking...….

    I am only looking to return a 1 or 0 hence the countifs.
    #6 is not working for me.....but the formula as amended by you in #2 is doing the trick so ill stick with that.

    Thanks
    Kevin

+ 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. not getting expected result
    By Patcheen in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-30-2018, 09:51 AM
  2. [SOLVED] INDEX MATCH formula not returning expected result
    By lukela85 in forum Excel General
    Replies: 4
    Last Post: 12-18-2017, 11:23 AM
  3. [SOLVED] Match formula does not return expected result?
    By Aland2929 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-05-2017, 10:56 AM
  4. [SOLVED] Index - Match formula not giving me an expected result
    By longbow007 in forum Excel General
    Replies: 5
    Last Post: 11-25-2015, 07:34 PM
  5. Same formula but results are differ (Some expected result, some gave #Num! error)
    By fadilahisnin in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-17-2015, 04:02 AM
  6. INDEX formula trouble, doesn't show expected result
    By Tacita in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-14-2015, 12:33 PM
  7. Replies: 3
    Last Post: 04-22-2015, 12:58 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