+ Reply to Thread
Results 1 to 14 of 14

combining two Excel formulas?

  1. #1
    Registered User
    Join Date
    10-10-2013
    Location
    Gloucester
    MS-Off Ver
    Excel 2010
    Posts
    6

    combining two Excel formulas?

    Hi,

    I have two formulas which both work individually but I need to combine them together into one long formula.

    A) =COUNTIFS(K:K, "R",L:L, "P") ..... makes 93

    b) =SUMPRODUCT((D8:D10000<>"")/COUNTIF(D8:D10000,D8:D10000&"")) ........... makes 136

    If I was to use the filters to get the result I want there is 7 unique references in D which have a R in K and a P in L.

    When I try to combine formula A with B i get 229 not 7.

  2. #2
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: combining two Excel formulas?

    Hello Neilv, welcome to the forum can you please upload a sample book
    GO to Advanced---manage attachment--select file and upload file
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    WANT TO SAY THANKS, HIT ADD REPUTATION (*) AT THE BOTTOM LEFT CORNER OF THE POST

    More we learn about excel, more it shows us, how less we know about it.

    for chemistry
    https://www.youtube.com/c/chemistrybyshivaansh

  3. #3
    Registered User
    Join Date
    10-10-2013
    Location
    Gloucester
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: combining two Excel formulas?

    Thanks for your reply

    I have uploaded a smaller example

    a count of all the R's and P's and a count of the unique instances of the CR number. I need to make this one formula which i think the result would be 3
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: combining two Excel formulas?

    Hello Neilv Count of all R's is 7 and All P's is 12 and Unique values in your uploaded sheet is 11 then how can it results in 3

  5. #5
    Registered User
    Join Date
    10-10-2013
    Location
    Gloucester
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: combining two Excel formulas?

    Sorry i mean it must have and R and a P which brings it down to 4 rows, out of the 4 rows there is only 3 unique values in CR/INFRA number

  6. #6
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: combining two Excel formulas?

    Are you looking for something like this
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    10-10-2013
    Location
    Gloucester
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: combining two Excel formulas?

    You're amazing, that worked a treat!

    Last thing i need to do now is expand on what you've done with one more condition to say and column Q is blank

    So count all the unique references where they have both an R and a P and there is an issue

    Sorry to be a pain
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: combining two Excel formulas?

    Like This !!
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    10-10-2013
    Location
    Gloucester
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: combining two Excel formulas?

    I cant thank you enough, thats worked perfectly!

  10. #10
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: combining two Excel formulas?

    Thanks you Neliv for reverting back !

  11. #11
    Registered User
    Join Date
    10-10-2013
    Location
    Gloucester
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: combining two Excel formulas?

    i wish i could send you the whole sheet but its too big. In copying your formula over i have mad a mistake somewhere. Do you have any idea why its counting blanks in the CR collounm, also some refs are being counted twice? i'll try to give an example. Its the two boxes in Red im trying to calculate the first is all the R's and P's but only one of each number (not including blanks) the second is out of the ones counted which of these have issues.

    When its right i think it should be 7 and 6
    Attached Files Attached Files

  12. #12
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: combining two Excel formulas?

    Hello Neilv In T8 copy and paste below and drag down
    =IF(ISTEXT(($S8)),IF(COUNTIF($S$8:S8,S8)<>1,0,COUNTIF($S$8:S8,S8)),"")
    and in V8 copy and paste below and drag down
    IF(ISTEXT((U8)),IF(COUNTIF($U$8:U8,U8)<>1,0,COUNTIF($U$8:U8,U8)),"")

  13. #13
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: combining two Excel formulas?

    Hello Neilv In T8 copy and paste below and drag down
    =IF(ISTEXT(($S8)),IF(COUNTIF($S$8:S8,S8)<>1,0,COUNTIF($S$8:S8,S8)),"")
    and in V8 copy and paste below and drag down
    IF(ISTEXT((U8)),IF(COUNTIF($U$8:U8,U8)<>1,0,COUNTIF($U$8:U8,U8)),"")

    There are some leading and trailing space in your CR Numbers. To remove that spaces select Y8 and copy paste =Trim(D8) and Drag down once you have covered all value i.e. Till D42.Then select Y8:Y42 copy this and select d8, instead of paste,here do paste special, select values option only.That will do
    Last edited by hemesh; 10-11-2013 at 06:26 AM.

  14. #14
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: combining two Excel formulas?

    Find attached file , I have adjusted the formulas.
    Attached Files Attached Files

+ 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. Need help combining three formulas for both Excel and VBA for automation.
    By DoodlesMama in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-16-2012, 07:57 PM
  2. Combining three formulas
    By neil676 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-17-2009, 09:44 AM
  3. combining 2 formulas
    By cat1410 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 08-02-2008, 09:34 PM
  4. [SOLVED] Combining formulas
    By jezzica85 in forum Excel General
    Replies: 5
    Last Post: 03-03-2006, 03:00 AM
  5. [SOLVED] Combining two formulas
    By Khalil Handal in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-07-2005, 05:07 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