+ Reply to Thread
Results 1 to 5 of 5

Number in this cell is formatted by text or preceded by an apostrophe Problem

  1. #1
    Forum Contributor
    Join Date
    07-28-2018
    Location
    India
    MS-Off Ver
    2013
    Posts
    173

    Number in this cell is formatted by text or preceded by an apostrophe Problem

    Hi,
    I have a code below & this code is putting data formatted by text or preceded by an apostrophe
    This code is putting notepad data to .xlsx

    Thnx For The Help



    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Leonardo1234; 10-20-2022 at 08:04 AM.

  2. #2
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Number in this cell is formatted by text or preceded by an apostrophe Problem

    Probably the quickest solution is to change this line:

    Please Login or Register  to view this content.
    Remove the " As String" to leave this:

    Please Login or Register  to view this content.
    WBD
    Office 365 on Windows 11, looking for rep!

  3. #3
    Forum Contributor
    Join Date
    07-28-2018
    Location
    India
    MS-Off Ver
    2013
    Posts
    173

    Re: Number in this cell is formatted by text or preceded by an apostrophe Problem

    Getting Error Sir

    Run- time Error 9
    subscript out of range

    error Highlighted line: Let arrOut(Cnt, Clm) = arrClms(Clm - 1)


    Please Login or Register  to view this content.
    Last edited by Leonardo1234; 11-02-2022 at 12:10 AM.

  4. #4
    Valued Forum Contributor
    Join Date
    08-08-2022
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2019
    Posts
    1,777

    Re: Number in this cell is formatted by text or preceded by an apostrophe Problem

    Hi. Try this way:

    Please Login or Register  to view this content.

  5. #5
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Number in this cell is formatted by text or preceded by an apostrophe Problem

    Running the amended code with the file you attached in post #1 gives no errors for me. Are you using a different text file when getting the error?

    WBD

+ 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] Help with Optimizing Slow Working cut/paste data macro
    By Chriz in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-04-2019, 10:46 AM
  2. [SOLVED] Macro working slow
    By khushboo# in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-13-2018, 07:20 AM
  3. Macro working very slow when sheet switch
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-19-2014, 04:00 AM
  4. Macro is running real slow and makes navigating the worksheet really slow after execution.
    By MichWolverines in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-03-2013, 04:29 PM
  5. [SOLVED] slow computer (slow clipboard) breaks my macro
    By twilsonco in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-05-2013, 09:16 PM
  6. Macro working very slow in Excel 2007
    By kapil in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-29-2012, 04:41 AM
  7. Excel 2003 macro working very slow in Excel 2007 (xlsm format)
    By kapil in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-17-2010, 11:26 AM

Tags for this Thread

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