+ Reply to Thread
Results 1 to 6 of 6

Help needed with different data types

Hybrid View

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

    Help needed with different data types

    Hi all

    I'm new to this forum and would appreciate some help with a problem I'm having.

    The scenario is that I am trying to aggregate survey responses for the year from separate spreadsheets to quarterly and yearly totals. The responses contain not only numerical values but contain, '*', 'N/A' and blank cells depending upon the return. For transparency, I do not want to amend the return in any way.

    I am running VLOOKUPS to bring in the 'Percentage Not Recommended' figure, for example, for Jan, Feb and March into 'QTR 1' and working out the overall percentage. So for QTR 1, I'm using the formula =IFERROR(SUM(F3:H3)/COUNTIF(F3:H3,">0"),0) which is the sum of the percentages divided by the number of returns for that quarter, but run into an issue where I get '0' if the return is not a numerical value.

    I would like '0' to be returned if the percentage truly is '0' but something like 'no data' if the cells contain no numerical values or are blank. I haven't figured out a way to get this working yet - any assistance would be really appreciated.

    Ken

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,762

    Re: Help needed with different data types

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

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

    Re: Help needed with different data types

    Hi AliGW

    Thanks for your response. I've uploaded the sample spreadsheet as requested.

    Regards
    Attached Files Attached Files

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,796

    Re: Help needed with different data types

    Try this formula in E2 then copy to E3:E4 and I2:I4.

    Formula: copy to clipboard
    =IF(COUNT(B2:D2)=0,"No data",AVERAGE(B2:D2))
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

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

    Re: Help needed with different data types

    Hi Jeff

    Just tried it and it worked a treat, thank you so much for this! I had it in my head that I would have to deal with one or another of the excel handle errors to get this working. I spend hours fiddling with them to no avail. Hats off to you mate. Thanks also to AliGW for your response.

    Regards

    Ken

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,796

    Re: Help needed with different data types

    Glad it helped. Come on back if you have other problems!

+ 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: 11
    Last Post: 08-13-2015, 08:12 AM
  2. Replies: 7
    Last Post: 06-01-2015, 03:11 PM
  3. Replies: 0
    Last Post: 07-28-2014, 05:49 PM
  4. Replies: 0
    Last Post: 10-14-2010, 08:22 AM
  5. Opinions needed on different types of VB
    By wilro85 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-25-2009, 05:36 PM
  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