+ Reply to Thread
Results 1 to 3 of 3

get external data go the wrong range

  1. #1
    Registered User
    Join Date
    08-25-2016
    Location
    kay ell
    MS-Off Ver
    2007
    Posts
    33

    get external data go the wrong range

    hello again all

    i have macro to get external data from text file

    the problem is it doesnt paste the data into the correct range

    it supposed to fill in the range b3:e13 , instead of that , it goes to range b4:e14

    refer to my attachment , tq
    Attached Files Attached Files
    Last edited by smatbis; 05-06-2018 at 10:22 AM.

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: get external data go the wrong range

    That's because somehow the first character in your text file is hidden line feed character i.e. just before the character B.
    If you open your text file, place the cursor before B and hit the backspace key, it will delete that and then save the text file and run your macro you will get the desired output.
    Import the data from the attached Text file and see if that works as desired.
    Attached Files Attached Files
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Registered User
    Join Date
    08-25-2016
    Location
    kay ell
    MS-Off Ver
    2007
    Posts
    33

    Re: get external data go the wrong range

    Quote Originally Posted by sktneer View Post
    That's because somehow the first character in your text file is hidden line feed character i.e. just before the character B.
    If you open your text file, place the cursor before B and hit the backspace key, it will delete that and then save the text file and run your macro you will get the desired output.
    Import the data from the attached Text file and see if that works as desired.
    thanks sir for the explanation

+ 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. Replies: 0
    Last Post: 06-08-2016, 10:53 AM
  2. Directory that external Pascal program detects is wrong
    By Maddingl in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-07-2016, 06:19 AM
  3. Activating a Macro with a External Code and everything got wrong
    By jaunfra in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-02-2013, 08:34 PM
  4. Code is placing data in the wrong range
    By Habanero Time in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-24-2012, 11:25 AM
  5. External Data Range
    By blatham in forum Excel General
    Replies: 0
    Last Post: 11-22-2006, 07:37 AM
  6. Replies: 0
    Last Post: 04-05-2006, 06:10 AM
  7. [SOLVED] insert entire row for new data, external data range doesnt work
    By orlya1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-03-2006, 03:45 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