+ Reply to Thread
Results 1 to 8 of 8

Cannot Format Number With Index Match

  1. #1
    Registered User
    Join Date
    01-20-2017
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    199

    Cannot Format Number With Index Match

    I have a problem not being able to format numbers after they will filled using INDEX MATCH:

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


    It pulls in the correct numbers but some are displayed with many decimal places even though the source number is formatted to 2 decimal places and the column where the results are has been formatted to 2 decimal places.

    Does anyone know why?

    Thank you

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Cannot Format Number With Index Match

    1. you dont need to enter that formula as an ARRAY, just enter regularly.
    2. what does the source data look like - is it numeric of text (and where does it come from?)
    test with =ISNUMBER(cell-ref)...FALSE indicates TEXT and you will need to convert
    =IFERROR(--INDEX(Sheet1!H$3:H$12&"",MATCH(Sheet2!$A3,Sheet1!$G$3:$G$12,0)),"")
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    01-20-2017
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    199

    Re: Cannot Format Number With Index Match

    Source data is number and set as 2 decimal places. Thank you for the help

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

    Re: Cannot Format Number With Index Match

    Actually the source data was only formatted to look as if it had two decimal places. The issue traces back to the formula in Sheet1!E3 and down. Paste the following formula into Sheet1!E3 and double click the fill handle, then check on sheet 2 to see that the numbers now display as desired:
    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 Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Cannot Format Number With Index Match

    Why does your formula concatenate empty string onto the column H values -- effectively converting those numbers to text strings? My first thought would be to remove that concatenation from the formula, so that the formula will return numbers and not text.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Cannot Format Number With Index Match

    Change your formula to non-arrayed
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    You were converting the number to text with the &"" !
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  7. #7
    Registered User
    Join Date
    01-20-2017
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    199

    Re: Cannot Format Number With Index Match

    That works thank you very much. I didn't know it traces back that way for format.

    Thanks to everyone helping.

    The &"" converted it to text like ChemistB mentioned and going back to the Sheet1!E3 makes a difference too like JeteMc mentioned.

    Cheers!
    Last edited by BillyRaySpivy; 02-09-2017 at 03:24 PM.

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

    Re: Cannot Format Number With Index Match

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. Just a short note, formatting is just the way that Excel displays a number, it doesn't change the value of the number. For example, download the workbook attached to post #3 and select Shee1!E11. Now run Evaluate Formula from the Formulas tab. You'll see that the result of dividing C11 by D11 has 15 decimal places, whereas it is only displayed as a number with two decimal places. I hope that you have a blessed day.

+ 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] Index match match with the column number determined by two rows???
    By bridge4444 in forum Excel General
    Replies: 2
    Last Post: 08-08-2016, 04:23 AM
  2. [SOLVED] Converting Hlookup to Index Match with variable column index number
    By SimonLock in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-09-2015, 09:14 AM
  3. Index and match font format changed
    By namialus in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-06-2014, 11:00 AM
  4. [SOLVED] Counting the number of times INDEX/MATCH finds more than 1 match.
    By loloduane in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-23-2014, 03:35 AM
  5. Replies: 6
    Last Post: 03-17-2014, 08:10 PM
  6. index match not working - format?
    By stockgoblin42 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-21-2013, 02:38 PM
  7. Return Conditional Format on INDEX/MATCH
    By natty76 in forum Excel General
    Replies: 1
    Last Post: 05-23-2011, 05:46 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