+ Reply to Thread
Results 1 to 7 of 7

Macro changing text to "?/??" format???

  1. #1
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Macro changing text to "?/??" format???

    I have the code below in a macro which seemed to work fine but somehow it manages to convert cells in text format into "?/??" format when the macro is run. This bit relates to the part of the code highlighted in red below... Any questions please ask, this is causing me major problems and need to fix it asap. I've attached a copy of the workbook if it helps. Unfortunately, to run the macro you will need to change the file directory to one that will suit.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by adam2308; 09-16-2009 at 09:14 AM.

  2. #2
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Re: Macro changing text to "?/??" format???

    Could i possibly bump this thread up... Any suggestions would be greatly appreciated.

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Macro changing text to "?/??" format???

    The code is pasting whatever format is in the copied cells. If you just want to paste values, change Paste:=xlPasteValuesAndNumberFormats to Paste:=xlPasteValues
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Re: Macro changing text to "?/??" format???

    Sorry for only just replying on this, got busy with something else...

    I can't paste just the values with this as this would only work the fractions 4/6 and 6/4, other fractions would paste the numeric value i.e. 7/4 would paste 1.75 and i need to keep it to the fractional format.

    I have tried to replicate the macro manually (without deleting all the rows that column A is blank) and it works ok but won't work when using the macro button.

  5. #5
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Re: Macro changing text to "?/??" format???

    Can anyone help with this or am i not making myself clear enough? Like i said earlier you may need to setup 3 csv files and alter the file directory in the VBA to suit to see the macro work for yourself.

  6. #6
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Re: Macro changing text to "?/??" format???

    Can anyone help?

    Thanks.

  7. #7
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Re: Macro changing text to "?/??" format???

    I've just found out (by trial and error) that if i delete this portion of the red code above, the 4/6 remains as 4/6 and does not round down to 2/3.

    Please Login or Register  to view this content.
    As far as i know this code should simply delete any rows where the column is blank. I don't understand how it would affect the rest of the code whether it was in the macro or not?

    Any help please?

+ 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