+ Reply to Thread
Results 1 to 7 of 7

SUMIF?? for combination text-numeric greater than a certain number

  1. #1
    Registered User
    Join Date
    06-25-2014
    Location
    New York, NY
    MS-Off Ver
    Office for Mac 2011
    Posts
    5

    SUMIF?? for combination text-numeric greater than a certain number

    I am trying to figure out how to sum visits for various browser sizes. The browser sizes are displayed in a combination of text and number (eg, 600x1200). I want to count any visits with a screen size above 1000 (either height or width). Anyone know how to do this?

    See attached.
    Attached Images Attached Images
    Last edited by sam887; 06-25-2014 at 12:00 PM.

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: SUMIF?? for combination text-numeric greater than a certain number

    Welcome to the Forum.
    Please don't upload images as images are not very helpful and don't expect anybody to type the data shown in the image into the excel sheet on your behalf.

    Try this...... (not tested but arrange the data as per the ranges in the formula and test the formula to see whether you get the desired result.)

    Assuming your Browser Sizes are in the range B4:B13 and Visits are in the range C4:C13 (as per your example image), then

    Please Login or Register  to view this content.
    Is this what you are trying to achieve?
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Valued Forum Contributor
    Join Date
    11-02-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    564

    Re: SUMIF?? for combination text-numeric greater than a certain number

    Took data from A1 to B3 in my sample.

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

    Control+Shift+Enter
    Last edited by haripopuri; 06-25-2014 at 01:08 PM. Reason: Forgot CSE
    ________________________________________________________
    If your problem is solved, update the thread as SOLVED: Go to the top of the first post-Select Thread Tools-Select Mark thread as Solved OR - Go to the first post - Click edit- Click Advance- Just below the word "Title:" you will see a dropdown with the word No prefix.- Change to Solve- Click Save.

    Show your gratitude to the person who helped you solving your problem by clicking on star button at the bottom of such post.

  4. #4
    Registered User
    Join Date
    06-25-2014
    Location
    New York, NY
    MS-Off Ver
    Office for Mac 2011
    Posts
    5

    Re: SUMIF?? for combination text-numeric greater than a certain number

    @sktneer,

    This is amazing - I would have never gotten it. I wasn't able to make the exact formula work, however I tweaked it to only focus on a single cell. See here:

    =SUMPRODUCT(--(LEFT(B9,FIND("x",B9)-1)*1>1000),C9)+SUMPRODUCT(--(RIGHT(B9,LEN(B9)-FIND("x",B9))*1>1000),C9)

    Where B9 is the screen size and C9 is the number of visits. The actual data is a massive table, but I am having one other issue. If I set the browser size to >500, I find that it double counts the visits for the screen size. Is there a way to alter it so that if the output is greater than the actual visits, I can divide by two?

    Or, more simply, is there a way to ensure that it does not double count visits if both the height and width are greater than any number I enter?

    Thank you!!!

  5. #5
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: SUMIF?? for combination text-numeric greater than a certain number

    Oh yes. I didn't consider that what if both the height and width are greater than 1000 in a single cell? Very good pick...
    In that case try this Array Formula which requires confirmation with Ctrl+Shift+Enter instead of just Enter. (i.e. after placing the formula in the cell hold down the Ctrl+Shift and then press Enter and if you paste the formula in the cell, first press F2 (function key) and then hold down Ctrl+Shift and then press Enter.)

    Please Login or Register  to view this content.
    See if you get the desired result.

  6. #6
    Registered User
    Join Date
    06-25-2014
    Location
    New York, NY
    MS-Off Ver
    Office for Mac 2011
    Posts
    5

    Re: SUMIF?? for combination text-numeric greater than a certain number

    Great stuff. Before I saw the reply I simply created a new column that with:

    =IF(F11>C11,F11/2,IF(F11=C11,C11)

    so that if the number is greater, it divides by 2 but if the number is the same, it displays that number. Not as elegant but it gets the job done.

    Thanks for the help - this forum is great.

  7. #7
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: SUMIF?? for combination text-numeric greater than a certain number

    Here is a solution for you that takes the list of browser sizes and if there are duplicates creates a list of unique sizes and gives the total for all browser sizes that have a dimension of 1000 or more in either length, width or both.

    The solution uses a helper column to determine the dimensions and returns. I used text values to make it obvious what the results were. You might prefer something else:

    lessless if both dimensions are < 1000
    lessgreater if the first dimension is less than 1000 and the second dimension is >=1000
    greaterless if the first dimension is >1000 and second dimension is <1000
    greatergreater if both dimensions >=1000

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


    Unique browser sizes:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Count for browsers with a dimension >=1000
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Conditional formatting hides 0 values
    Attached Files Attached Files
    Last edited by newdoverman; 06-25-2014 at 04:39 PM.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

+ 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. Sumif is working for numeric values but can we do the same for text?
    By vinsocf in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-06-2014, 02:59 PM
  2. Sumif is working for numeric values but can we do the same for text?
    By vinsocf in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-06-2014, 08:35 AM
  3. Replies: 12
    Last Post: 12-13-2013, 04:29 PM
  4. [SOLVED] Sorting a combination text/numeric value
    By JimDandy in forum Excel General
    Replies: 4
    Last Post: 10-02-2013, 12:48 PM
  5. HOW DO YOU SUMIF THE NUMBER IS GREATER THAN BUT LESS THAN A #
    By uma in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-06-2005, 02:05 PM

Tags for this Thread

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