+ Reply to Thread
Results 1 to 2 of 2

inputting multiple data with different formats into the same cells

  1. #1
    Registered User
    Join Date
    07-14-2007
    Posts
    1

    Question inputting multiple data with different formats into the same cells

    Hi all,
    I have a macro which inputs currency and decimals into the same cells. the problem is that every time i run the macro whichever type (currency/decimal) is inputed first remains as the cell format. For example if i run the macro for the first time and currency values is entered into the cells, then run it again and decimals numbers is inputted into the same cells, the decimals would look like currency. how can i change this and get the cells to represent the inputed values as they are really meant to be. Here is a piece of the code. the problem is where var1min/max and var2min/max is inputed into cells 26 to 29 column A and B.

    'Input the minimum of the two variables'
    Please Login or Register  to view this content.
    Last edited by VBA Noob; 07-14-2007 at 12:19 PM.

  2. #2
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    You could read the number format of the cell you are copying, and then apply that format to the new cell:
    Please Login or Register  to view this content.
    HTH

    Jason

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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