+ Reply to Thread
Results 1 to 9 of 9

Need Macro to off set large amount of data

  1. #1
    Registered User
    Join Date
    01-20-2011
    Location
    Boston
    MS-Off Ver
    Excel 2007
    Posts
    41

    Need Macro to off set large amount of data

    I'm sorry for being so noob at this but I really need help. I have a spread sheet with this format


    1 2
    3 4
    5 6
    7 8
    9 10
    etc...

    I want that to become

    2 3
    4 5
    6 7
    8 9
    etc...and so on

    Can anyone please help me please??!!! Any help will be greatly appreciated.
    Last edited by khoadphamm; 06-29-2011 at 09:59 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Need Help Writing a simple Macro!!!

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    PLEASE PM WHEN YOU HAVE DONE THIS AND I WILL DELETE THIS POST
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    03-16-2004
    Location
    UK
    MS-Off Ver
    2003
    Posts
    85

    Post Re: Need Help Writing a simple Macro!!!

    Try something like this....

    Please Login or Register  to view this content.
    Phil

  4. #4
    Registered User
    Join Date
    01-20-2011
    Location
    Boston
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: Need Help Writing a simple Macro!!!

    Hey incjourn thanks for the help but this is what happened when I tried your code

    I had this

    1 2
    3 4
    5 6
    7 8
    9 10
    11 12
    13 14
    15 16
    17 18
    19 20

    I ran your code then I ended up with this

    2 2
    4 4
    6 6
    8 8
    10 10
    12 12
    14 14
    16 16
    18 18
    20 20

  5. #5
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Need Macro to off set large amount of data

    khoadphamm,

    Detach/open workbook ReorgData A B to D E - khoadphamm - EF782149 - SDG13.xlsm and run the ReorgData macro.


    The macro will write the information to columns D and E.



    If you want to use the macro on another workbook:


    Please TEST this FIRST in a COPY of your workbook (always make a backup copy before trying new code, you never know what you might lose).


    1. Copy the below code, by highlighting the code and pressing the keys CTRL + C
    2. Open your workbook
    3. Press the keys ALT + F11 to open the Visual Basic Editor
    4. Press the keys ALT + I to activate the Insert menu
    5. Press M to insert a Standard Module
    6. Where the cursor is flashing, paste the code by pressing the keys CTRL + V
    7. Press the keys ALT + Q to exit the Editor, and return to Excel
    8. To run the macro from Excel, open the workbook, and press ALT + F8 to display the Run Macro Dialog. Double Click the macro's name to Run it.


    Please Login or Register  to view this content.

    Before you use the macro with Excel 2007 or newer, save your workbook, Save As, a macro enabled workbook with the file extension .xlsm


    Then run the ReorgData macro.
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  6. #6
    Registered User
    Join Date
    01-20-2011
    Location
    Boston
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: Need Macro to off set large amount of data

    Thank you for your help on that question I had, but I hope you're not too busy to help me on something a little more specific please.

    See Attach

    Basically looking at column C and D starting at Row 6

    I want to move D6 to C6, D7 to D6 and so on. So the next one would be D7 to C7, D8 to D7 doing so until you reach the end of the list which varies.

    If you could please help me anyway possible I would greatly apprechiate it.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-20-2011
    Location
    Boston
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: Need Macro to off set large amount of data

    Any help would be great

  8. #8
    Registered User
    Join Date
    01-20-2011
    Location
    Boston
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: Need Macro to off set large amount of data

    Please!!!!!!!!!!!!

  9. #9
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Need Macro to off set large amount of data

    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

+ 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