+ Reply to Thread
Results 1 to 24 of 24

Find a text value with a sumifs function

  1. #1
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Sweden
    MS-Off Ver
    2016.
    Posts
    397

    Find a text value with a sumifs function

    I am trying to get a text value with a sumifs function, is this possible or should I use another function?

    See attached file!

    Thank you,
    Waimea
    Attached Files Attached Files

  2. #2
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Find a text value with a sumifs function

    ="Here they are building "&INDEX(F4:F7,MATCH(1,INDEX((E4:E7=$B$4)*(H4:H7="Yes"),),))&" seats"

  3. #3
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Sweden
    MS-Off Ver
    2016.
    Posts
    397

    Re: Find a text value with a sumifs function

    Thank you, that gives me the total of seats! Is it possible to get the names of the company (A,B,C,D) in the result?

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,535

    Re: Find a text value with a sumifs function

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

    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Sweden
    MS-Off Ver
    2016.
    Posts
    397

    Re: Find a text value with a sumifs function

    Thank you JeteMc! It works great!

    Could you explain the different parts of the formula? (So that I can learn)

    I understand iferror and index.

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,535

    Re: Find a text value with a sumifs function

    Since you understand IFERROR and INDEX I'll just explain AGGREGATE.
    The AGGREGATE function as used in the formula I posted would replace array entered SMALL(IF based formulas that were common syntax in the versions prior to 2010. The argument 15 is SMALL, used to find the Kth smallest row that meets the criteria of a City being the Selected City. The argument 6 ignores errors that that may occur when dividing the row numbers by FALSE. The first use of the ROW function, ROW($5:$8)-4, produces an array of row numbers 1, 2, 3, 4 and the second use of the ROW function, ROW(1:1) is a counter for the argument K. I hope that I covered that well enough, let me know if not.
    I suggest that you select cell E12 and use the Evaluate Formula feature (Formula tab in the 2010 version) to see how the functions work together.
    Thank You for marking the thread as 'Solved'. I hope that you have a blessed day.

  7. #7
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Sweden
    MS-Off Ver
    2016.
    Posts
    397

    Re: Find a text value with a sumifs function

    I am reposting in this thread instead of creating a new thread and I hope it is ok to revive old threads.

    I want to extract a lot of information from my data table to my formula, at the moment I am using sumifs.

    I would like to see what company is building in what muncipality, what year they are building it and how many places they are building!



    See attached workbook for more details!

    All help is very much appreciated.
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,535

    Re: Find a text value with a sumifs function

    In general it is best to start a new thread when you have a new question as old threads often are only monitored by the original participants.
    In this case I may be able to help. I believe that you want a formula similar to:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.

  9. #9
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Sweden
    MS-Off Ver
    2016.
    Posts
    397

    Re: Find a text value with a sumifs function

    Hi JeteMc,

    thank you for your reply and your code! This works great, now I have yet to understand the code!

  10. #10
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Sweden
    MS-Off Ver
    2016.
    Posts
    397

    Re: Find a text value with a sumifs function

    I have one question, does this code take the "In production" column into account? Where only buildings with "Yes" for "In production" are taken into account?

  11. #11
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Sweden
    MS-Off Ver
    2016.
    Posts
    397

    Re: Find a text value with a sumifs function

    Could you help me to update the formulas to use the "In Production" column into account? Where only "Yes" cases are showed.

  12. #12
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,535

    Re: Find a text value with a sumifs function

    For the company column the formula would read:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The others would be similar although the indexed columns would be F for seats and J for build year.
    Let us know if you have any questions.

  13. #13
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Sweden
    MS-Off Ver
    2016.
    Posts
    397

    Re: Find a text value with a sumifs function

    Hi JeteMc,

    thank you for updating your code! I am going to try it at once!

  14. #14
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Sweden
    MS-Off Ver
    2016.
    Posts
    397

    Re: Find a text value with a sumifs function

    Good morning,

    I am looking at your formula.

    I understand the
    Please Login or Register  to view this content.
    part.

    I understand the ranges for
    Please Login or Register  to view this content.
    and
    Please Login or Register  to view this content.
    .

    I don't understand the use of row()-4 and Row(1:1) ???
    Please Login or Register  to view this content.

  15. #15
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Sweden
    MS-Off Ver
    2016.
    Posts
    397

    Re: Find a text value with a sumifs function

    I can't get it to work, I have my data table in another worksheet but I can't get the ROW(Worksheetname!$5:$14) to work? Same goes for ROW(Worksheetname!1:1).

  16. #16
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Sweden
    MS-Off Ver
    2016.
    Posts
    397

    Re: Find a text value with a sumifs function

    I got it to work! Your formula is really clever!

  17. #17
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Sweden
    MS-Off Ver
    2016.
    Posts
    397

    Re: Find a text value with a sumifs function

    Is it possible to calculate in what year a company should build an arena??

  18. #18
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,535

    Re: Find a text value with a sumifs function

    The arguments for ROW will work without the worksheet reference -- i.e. ROW($5:$14) and ROW(1:1)
    ROW($5:$14) sets up an array of numbers {5, 6, 7 ... 14}
    The -4 changes that array to {1, 2, 3 ... 10}
    ROW(1:1) is the [k] argument for AGGREGATE, it will change as the formula is dragged down the column so that on the first row ROW(1:1) evaluates to 1 and on the second row ROW(2:2) evaluates to 2.
    Looking at the file attached to post #19, selecting cell J20 and running the Evaluate Formula feature may help in understanding how the formula works.
    Let us know if you have any questions.

    OOPS I responded to post #15 and didn't see that the posts on the second page of this thread had been posted. Glad that you got the formula to work.
    Last edited by JeteMc; 12-13-2018 at 10:03 AM.

  19. #19
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Sweden
    MS-Off Ver
    2016.
    Posts
    397

    Re: Find a text value with a sumifs function

    I got it to work and it is a really smart formula, thank you for your explanation which helped me now to understand why -4 is deducted.

  20. #20
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,535

    Re: Find a text value with a sumifs function

    To include a Build Year restriction, put the desired year in a cell (say M19) and then amend the formula to read:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.

  21. #21
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Sweden
    MS-Off Ver
    2016.
    Posts
    397

    Re: Find a text value with a sumifs function

    Thank you for your reply!

    I have put a year in cell M19, in what cell should I put the new formula?

  22. #22
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,535

    Re: Find a text value with a sumifs function

    Put the formula in J19 then drag the fill handle down. You'll also want to drag the formula to the right to populate the Seats and BuildYear columns. Be sure to change the INDEX references accordingly (i.e. INDEX(F$5:F$14... for the Seats column and INDEX(J$5:J$14... for the BuildYear column).
    Let us know if you have any questions.

  23. #23
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Sweden
    MS-Off Ver
    2016.
    Posts
    397

    Re: Find a text value with a sumifs function

    Thank you for your reply, I like your code and have changed the index to show me more data from my data table.

    I see what you did with the building restriction but I am trying to figure out in what year/years there are gaps.

    A gap could be in 2024 when no company is building, I also have the need for seats for each city.

    Is it possible to calculate in what year I should build based on what the competition is doing??

  24. #24
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Sweden
    MS-Off Ver
    2016.
    Posts
    397

    Re: Find a text value with a sumifs function

    Perhaps store the build years in an array and manipulate the array in some way?

+ 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: 5
    Last Post: 07-18-2016, 03:41 AM
  2. match function looking for text, or find function
    By anoi90 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-25-2014, 12:08 AM
  3. InStr function doesn't find specific text, but finds any text in column and runs code
    By mikey3580 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-27-2014, 03:50 AM
  4. [SOLVED] SUMIF or SUMIFS to find text and date between from items in a table
    By Beefy1 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-19-2014, 10:38 PM
  5. [SOLVED] nested if function trying to find text and return text in different cell
    By shelbyleighh in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-14-2013, 12:16 PM
  6. [SOLVED] Use TEXT function as Criteria on Sumifs to convert month/year to date format
    By chico.corrales in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-08-2012, 07:49 PM
  7. Function to find like text
    By mgxdigital in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-19-2010, 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