+ Reply to Thread
Results 1 to 6 of 6

Same data Mapping from one excel to another excel (Fileds change)

  1. #1
    Registered User
    Join Date
    05-01-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    3

    Same data Mapping from one excel to another excel (Fileds change)

    Hi guys,
    I have an excel sheet of say 3 fields X,Y,Z in a row but i want to rearrange them like Z,X,Y. so i wanted to do it in through Macro's. I am a fresher to Macro's.
    So please show me the way to do this work .

    Regards,
    Hemanth

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Same data Mapping from one excel to another excel (Fileds change)

    Hi, Hemanth ,

    is it Cells you are talking about, named ranges or the columns themselves? If cells: only in one row or in all?

    Please attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include BEFORE/AFTER sheets if needed to show the process you're trying to complete or automate. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    05-01-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Same data Mapping from one excel to another excel (Fileds change)

    Ya sure. I going to upload an Excel Named "A" Which is my input file and I wanted that A to be Converted into Excel sheet Named "B" Which should be my resultant file. So please let me know the code which has to be incorporated in Macro's

    Regards
    Hemanth
    Attached Files Attached Files

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Same data Mapping from one excel to another excel (Fileds change)

    Hi, Hemanth ,

    B must be a text file (you could save any Excel workbook as a textfile)?

    Maybe you should take a moment to make clear (at least to me) why you want multiple lines of information from a one liner of text as I doubt this may lead to other problems (I assume to read about merging cells being one of the next steps).

    I can certainly code for a solution but Iīd really like to know why before just doing so.

    CIao,
    Holger

  5. #5
    Registered User
    Join Date
    05-01-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Same data Mapping from one excel to another excel (Fileds change)

    Hi,Holger,
    There is no issue in asking that question to me Holger, The think is i work as a consultant for SAP software. Our Client will be giving us datarecords just like in Excel "A". So to upload the data into system that format has to be like Excel "B". thats all .. so i wanted to convert it through Macro's. This is the motto of my work.

    Thanks
    Hemanth

  6. #6
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Same data Mapping from one excel to another excel (Fileds change)

    Hi, Hemanth ,

    maybe give this code a try (I changed the fileformat to xlsm for the workbook with the name which originally was B):
    Please Login or Register  to view this content.
    Remarks about the code: I donīt know why you would need 4 cells with the number from A!A1, (deleted 2 lines in the sample file), and I couldnīt figure out where the E in B!B1 comes from (maybe that is A!E1. You could start using Arrays and loops to avoid all the lines of code posted here. Please only use a copy and test as there is not even the slighest bit of error handling included here.

    Ciao,
    Holger
    Attached Files Attached Files

+ 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