+ Reply to Thread
Results 1 to 7 of 7

IF SUMPRODUCT and handling different data types

  1. #1
    Registered User
    Join Date
    04-27-2016
    Location
    London
    MS-Off Ver
    MS Office 2010
    Posts
    5

    IF SUMPRODUCT and handling different data types

    I have a scenario where I'm trying to consolidate survey responses from individual monthly spreadsheets to quarters. I also have the number of responses for each month in a separate spreadsheet.

    I'm using a SUMPRODUCT(VLOOKUP function to pull through the total responses for the quarter but need some help combining this with an IF function to return "No data" if the values are less than 6 as the sample would be too small.

    Following that, I'm trying to calculate the response rate of people 'Extremely likely to recommend', 'Likely to recommend', 'Neither', 'Unlikely' and 'Extremely unlikely' by summing the total number of responses in each category by the number for that quarter. With this one I'm running into either '0' being displayed when there are text characters in the original data or '#DIV/0!' if the value is 0. I would like this to be either "No match" if the data is blank or is "'*", or to be '0' if the there are no responses. I cannot amend the original data for transparency.

    Any help would really be appreciated, thanks.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: IF SUMPRODUCT and handling different data types

    I advice you not to use *, since they are jokersigns in excel.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

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

    Re: IF SUMPRODUCT and handling different data types

    IFERROR(formula,"")
    will prevent the #DIV/0 errors

    otherwise try
    IF(OR(A1="*",A1=""),"No match",IF(A1=0,0,formula)

    I cant see any SUMPRODUCTs in your file
    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.

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

    Re: IF SUMPRODUCT and handling different data types

    You could use something like this in F2 copied down and the other similar columns. This will return 0 instead of the error values that you currently have in the Orange columns.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    There are no SUMPRODUCT formulae in the workbook so I have no real idea of what you are referring to or where these SUMPRODUCT formulae are for the first part of your problem.
    <---------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

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

    Re: IF SUMPRODUCT and handling different data types

    Assuming that N2 ,R2 ,V2 were actually supposed to display and asterisk, this array formula* will display the results on your 'After' sheet:
    Please Login or Register  to view this content.
    To activate:
    1) Paste the formula into F2,
    2) Press the F2 (function 2) key,
    3) Simultaneously press Ctrl, Shift and Enter
    4) Press Ctrl C to copy the formula in F2 then paste in J2, N2, R2, V2,
    5) Double click the fill handle of each of those cells to send the formula down the column.
    Let me 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.

  6. #6
    Registered User
    Join Date
    04-27-2016
    Location
    London
    MS-Off Ver
    MS Office 2010
    Posts
    5

    Re: IF SUMPRODUCT and handling different data types

    Hi all thank you for your responses thus far. JeteMc, your formula is great and works in all instances except where the cells are blank for the quarter as a '0%' is returned as the answer. Could this formula be expanded to also capture "No data" if the cell ranges are blank? Any help on this would be appreciated.

    I longer need any help with the SUMPRODUCT(VLOOKUP any more, thanks to all who have responded to this as well.

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

    Re: IF SUMPRODUCT and handling different data types

    Quote Originally Posted by Nemesis247 View Post
    works in all instances except where the cells are blank for the quarter as a '0%' is returned as the answer. Could this formula be expanded to also capture "No data" if the cell ranges are blank?
    I am assuming that "for the quarter" means the cells in column B. Working on that assumption modify the array entered formula* to read:
    Please Login or Register  to view this content.
    *Directions for entering are in my previous post.
    Let me know if you have any questions.

+ 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. Count number of event types occuring by month (SUMPRODUCT?)
    By iswizzle in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-23-2015, 03:04 PM
  2. Replies: 11
    Last Post: 08-13-2015, 08:12 AM
  3. Replies: 0
    Last Post: 07-28-2014, 05:49 PM
  4. Replies: 0
    Last Post: 10-14-2010, 08:22 AM
  5. Sumproduct with 2 types of spefic critiria
    By djfatboyfats in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-06-2008, 01:28 AM
  6. Data types?
    By Derek Norman in forum Excel General
    Replies: 2
    Last Post: 08-07-2005, 10:05 AM
  7. [SOLVED] Data types - Help
    By Pastor Andrew Alexander in forum Excel General
    Replies: 1
    Last Post: 02-18-2005, 10:06 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