+ Reply to Thread
Results 1 to 5 of 5

Calculating the average for numbers with special characters.

  1. #1
    Registered User
    Join Date
    01-30-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    13

    Calculating the average for numbers with special characters.

    Hi All...

    I can't be thankful enough to the members of this forum for helping me enhance my excel skills. I wonder if someone can help me out with the problem i am facing right now. I want to calculate the average for numbers in around 100 cells but the numbers are with special characters "▼","▲" as it is a dashboard. I am sure its a simple trick which i cannot figure out. Your help is much appreciated

    Here is a simple illustration what i want.

    9.20 ▼
    10.50▲
    11.34▲
    6.54 ▼
    so the required result should be. 9.40

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Calculating the average for numbers with special characters.

    Try
    =SUMPRODUCT((SUBSTITUTE(SUBSTITUTE(A1:A4,"▼",""),"▲","")*1))/COUNTA(A1:A4)

    or this array formula
    =AVERAGE((TRIM(LEFT(A1:A4,LEN(A1:A4)-1))*1))

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    Last edited by Ace_XL; 10-06-2013 at 12:54 PM.
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Calculating the average for numbers with special characters.

    You can use this formula to extract numbers from the cell

    =VALUE(MID(A2,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A2&"0123456789")),SUM(LEN(A2)-LEN(SUBSTITUTE(A2,{0,1,2,3,4,5,6,7,8,9},"")))))

    A
    B
    1
    2
    9.20 ▼
    9.2
    3
    10.50▲
    10.5
    4
    11.34▲*
    11.3
    5
    6.54 ▼
    6.5
    6
    9.4
    7
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Registered User
    Join Date
    01-30-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Calculating the average for numbers with special characters.

    Thanks a lot guys it worked like a charm.....you guys are awesome

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Calculating the average for numbers with special characters.

    You're welcome and thank you for the feedback!

+ 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. [SOLVED] i want re alter my numbers with special characters
    By vengatvj in forum Excel General
    Replies: 20
    Last Post: 09-30-2013, 06:51 PM
  2. How to calculate only values with numbers not special characters like!
    By toplisek in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-04-2013, 06:43 AM
  3. Replies: 4
    Last Post: 11-17-2012, 04:42 AM
  4. [SOLVED] remove spaces (special characters) after numbers
    By fareastwarriors in forum Excel General
    Replies: 13
    Last Post: 11-04-2012, 09:25 PM
  5. Disallow Special Characters,Certain Numbers Using Data Validation through VBA
    By e4excel in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-21-2011, 03:50 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