+ Reply to Thread
Results 1 to 8 of 8

Combining two formula (for tidyness)

  1. #1
    Registered User
    Join Date
    07-11-2014
    Location
    Australia
    MS-Off Ver
    MS365 (2208)
    Posts
    48

    Combining two formula (for tidyness)

    Hi,

    I've this formula:

    G1 =IF(COUNTIF(A2:B2,">=1"),F1,"")

    F1 =MIN(IF(('17 05 17 D'!$A$2:$A$50000=A132)*('17 05 17 D'!$I$2:$I$50000=AV132),IF('17 05 17 D'!$D$2:$D$50000="",FALSE,'17 05 17 D'!$D$2:$D$50000)))

    I'd like to amalgamate F1 into G1

    So if Count of A2 to B2 is greater or equal to 1 then above formula, if not then blank.

    last help for the day, I hope.. I'm under a little pressure to complete this.

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Combining two formula (for tidyness)

    Is this what you are looking for?

    =IF(COUNTIF(A2:B2,">=1"),MIN(IF(('17 05 17 D'!$A$2:$A$50000=A132)*('17 05 17 D'!$I$2:$I$50000=AV132),IF('17 05 17 D'!$D$2:$D$50000="",FALSE,'17 05 17 D'!$D$2:$D$50000))),"")
    Ctrl Shift Enter

  3. #3
    Registered User
    Join Date
    07-11-2014
    Location
    Australia
    MS-Off Ver
    MS365 (2208)
    Posts
    48

    Re: Combining two formula (for tidyness)

    Hi,

    It's likely me but now it's not working.

    On it's own the long array formula works but where it doesn't find values it returns a 0. I was correcting this by adding another formula that if the cell was 0 then show a blank else show the result.

    It would only be a 0 if cells A2 and B2 were both empty hence my thoughts on the countif.

    Now (likely my fault) the formula suggestion you've provided deals with adding a blank where A2:B2 are both empty but it now adds a N/A everywhere else.

    Thoughts? can I provide more info?

    Note: here is the formula you provided, I've changed it (I should have provided this direction at the start) to my first row.

    =IF(COUNTIF(AO3:AP3,">=1"),MIN(IF(('17 05 17 D'!$A$2:$A$50000=A3)*('17 05 17 D'!$I$3:$I$50000=AV3),IF('17 05 17 D'!$D$3:$D$50000="",FALSE,'17 05 17 D'!$D$3:$D$50000))),"")

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Combining two formula (for tidyness)

    All that I did was substitute F1 (in the G1 formula) with the formula that was in F1.

    I cannot troubleshoot a non-working formula based on the formula alone. If you upload a sample of your sheet, we should be able to help you further.

  5. #5
    Registered User
    Join Date
    07-11-2014
    Location
    Australia
    MS-Off Ver
    MS365 (2208)
    Posts
    48

    Re: Combining two formula (for tidyness)

    Ok falcondude, yes what you've said makes complete sense as it might be a complete start from scratch. I've created a simplified spread sheet to reduce 'columns' (it's attached I think), it'll still do what I want.

    In column E2 as an example I would like it to check if there is 1 or more value in B2 or C2, if there is I would like it to look for examples of A2 in in Column A of the Data tab and where there are also matches of D2 return the min date from the column B of the data sheet.

    I've typed in what the results should be, E3 and B3 should come back blank.

    thanks!
    Attached Files Attached Files

  6. #6
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Combining two formula (for tidyness)

    Quote Originally Posted by Stoobydoo View Post
    I've typed in what the results should be, E3 and B3 should come back blank.
    Where? I don't see them.

    What should the values in E2 and F2 be?

  7. #7
    Registered User
    Join Date
    07-11-2014
    Location
    Australia
    MS-Off Ver
    MS365 (2208)
    Posts
    48

    Re: Combining two formula (for tidyness)

    Sorry:

    Results sheet - E2 -
    I'd like this to recognise the asset in results sheet A2, also recognise the float in results sheet D2, I'd like it to then look for matches across rows in the Data Tab column A and column D, where it finds matches I'd like it to return the earliest start from the Data Tab column B.

    I'd like E3, and E4 to do the same as E2. Where it would find no matches in E3 I'd like the formula to return blank.

    Results sheet F2
    I'd like it to do the same as the above except return the max date from Data Tab column C

    I'd like F3, and F4 to do the same as F2. Where it would find no matches for F3 I'd like the formula to return blank.

    Make sense?

  8. #8
    Registered User
    Join Date
    07-11-2014
    Location
    Australia
    MS-Off Ver
    MS365 (2208)
    Posts
    48

    Re: Combining two formula (for tidyness)

    Revisited this with a fresh mind post replying:

    for E2:

    =MIN(IF((Data!$A$2:$A$18=Result!A2)*(Data!$D$2:$D$18=Result!D2),IF(Data!$B$2:$B$18="",FALSE,Data!$B$2:$B$18)))

    The formula above seems to work BUT

    I wanted to add a fail safe to it, again, saying if in the results tab there is no value in B2, or C2 then to not run the formula but instead return blank.

+ 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. combining two different formula's
    By MaWestra74 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-15-2017, 03:03 AM
  2. [SOLVED] Help in Combining Formula
    By shuriyan0924 in forum Excel General
    Replies: 13
    Last Post: 01-28-2015, 12:22 PM
  3. Combining OR and And in a formula
    By richmark in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 04-28-2013, 03:10 AM
  4. [SOLVED] Combining vertical cells into one and between blank rows start combining again?
    By mike_m1 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-21-2012, 12:19 PM
  5. [SOLVED] Combining two IF formula's
    By Oaks15 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-09-2012, 06:33 AM
  6. Combining formula
    By MikeNZ in forum Excel General
    Replies: 3
    Last Post: 04-28-2009, 11:48 AM
  7. Combining Formula
    By suburbanght in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-18-2007, 11:17 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