+ Reply to Thread
Results 1 to 5 of 5

Matching Number Format to Another Cell

  1. #1
    Registered User
    Join Date
    09-10-2017
    Location
    Mansfield, UK
    MS-Off Ver
    2007
    Posts
    23

    Matching Number Format to Another Cell

    Hi,

    I'm looping through columns and for each cell in the column I loop through data on another tab to find a result. The result can vary in format with regard to the number of decimal places it can have depending on the information needed for each column. In row 3 is the low limit for that column and I want the format of the result for each column to match the format of the data in row 2 of that column.

    The code I have so far is:
    Please Login or Register  to view this content.
    Am example of the sheet is attached as a slimmed down version .

    Any help would be greatly appreciated.
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    09-19-2008
    Location
    It varies ...
    MS-Off Ver
    Office365 - 64bit
    Posts
    862

    Re: Matching Number Format to Another Cell

    Can you not just copy then use PasteSpecial Paste:=xlPasteFormats from source to target when the match is found?
    MatrixMan.
    --------------------------------------
    If this - or any - reply helps you, remember to say thanks by clicking on *Add Reputation.
    If your issue is now resolved, remember to mark as solved - click Thread Tools at top right of thread.

  3. #3
    Registered User
    Join Date
    09-10-2017
    Location
    Mansfield, UK
    MS-Off Ver
    2007
    Posts
    23

    Re: Matching Number Format to Another Cell

    Unfortunately the format at the source isn't always the same as what is needed. I might be able to pick it up from the limit row though. I'll give it a whirl.

  4. #4
    Registered User
    Join Date
    09-10-2017
    Location
    Mansfield, UK
    MS-Off Ver
    2007
    Posts
    23

    Re: Matching Number Format to Another Cell

    Sorted it. Used paste special formats as mentioned, just made sure the formats were set correctly in the cells used as reference.

  5. #5
    Valued Forum Contributor
    Join Date
    09-19-2008
    Location
    It varies ...
    MS-Off Ver
    Office365 - 64bit
    Posts
    862

    Re: Matching Number Format to Another Cell

    Excellent - glad you got it sorted with a simple approach

+ 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] Conditional Format one cell in a row based on a value matching a header row
    By purdue7997 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-16-2017, 09:18 AM
  2. Replies: 12
    Last Post: 05-18-2017, 05:12 PM
  3. [SOLVED] How to Sum based on partial match of a cell in number format (not text format)
    By NBehrens in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-24-2017, 12:34 PM
  4. Replies: 2
    Last Post: 01-28-2015, 09:07 AM
  5. matching a cell with a number in
    By pdcrawley in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-29-2013, 05:29 PM
  6. Format the text matching to adjacent cell
    By nickjack89 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-10-2011, 06:18 AM
  7. Number format based on number format of another cell in another workbook
    By Rob in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-09-2005, 01:06 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