+ Reply to Thread
Results 1 to 13 of 13

How to change this macro to include 6 columns of data instead of 3 :)

  1. #1
    Registered User
    Join Date
    05-31-2016
    Location
    glasgow
    MS-Off Ver
    2013
    Posts
    7

    How to change this macro to include 6 columns of data instead of 3 :)

    Please Login or Register  to view this content.
    How do i change this code to include more columns. This code is used to reorganise similar data from columnar to rows. Much appreciated.

    Kind regards,

    MODERATOR NOTE:

    Pls use code tags around your codes.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: How to change this macro to include 6 columns of data instead of 3 :)

    Can you upload a sample workbook with examples of the data this code would originally be for and the new data?

    Click on GO ADVANCED and use the paperclip icon to open the upload window.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    05-31-2016
    Location
    glasgow
    MS-Off Ver
    2013
    Posts
    7

    Re: How to change this macro to include 6 columns of data instead of 3 :)

    Hi thank you for your quick response. Sorry im a bit of a noob at this. Hope this attachment works.
    Attached Files Attached Files

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: How to change this macro to include 6 columns of data instead of 3 :)

    Does the attached show how you would want the new data to appear after the macro?
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    05-31-2016
    Location
    glasgow
    MS-Off Ver
    2013
    Posts
    7

    Re: How to change this macro to include 6 columns of data instead of 3 :)

    No sorry, I just placed question marks there to show where I was stuck. If possible, I want the data to be presented the same way as the original data but to include the 3 added columns.

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: How to change this macro to include 6 columns of data instead of 3 :)

    So where would the 3 added columns go, they are for each row?

    Could you mock up what you would want?

  7. #7
    Registered User
    Join Date
    05-31-2016
    Location
    glasgow
    MS-Off Ver
    2013
    Posts
    7

    Re: How to change this macro to include 6 columns of data instead of 3 :)

    I have highlighted what I want in green. Thanks again
    Attached Files Attached Files

  8. #8
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: How to change this macro to include 6 columns of data instead of 3 :)

    Eh, isn't that kind of like what I had in I13:X16 in the file I attached?

  9. #9
    Registered User
    Join Date
    05-31-2016
    Location
    glasgow
    MS-Off Ver
    2013
    Posts
    7

    Re: How to change this macro to include 6 columns of data instead of 3 :)

    yeah i thought the macro would work the same for both sets (3 columns and 6). However, when i used the macro it messed up.
    So, the original transformation was A1:C7 converted via macro to A13:G16. My aim with your help is to convert L1:Q7 to J13:Y16. The spreadsheet has over 500 rows hence why the need for the macro is so high lol

  10. #10
    Registered User
    Join Date
    05-31-2016
    Location
    glasgow
    MS-Off Ver
    2013
    Posts
    7

    Re: How to change this macro to include 6 columns of data instead of 3 :)

    sorry i just saw your attachment. Yeah thats exactly how i want the data shown. Totally missed that

  11. #11
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: How to change this macro to include 6 columns of data instead of 3 :)

    Try this.
    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    05-31-2016
    Location
    glasgow
    MS-Off Ver
    2013
    Posts
    7

    Re: How to change this macro to include 6 columns of data instead of 3 :)

    Worked perfectly! Thank you so much. May ask what you changed for future reference or if the column number change again?

  13. #13
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: How to change this macro to include 6 columns of data instead of 3 :)

    I can tell you what I changed not sure it would help in the future though.

    Anyways I'll give a try, in the red highlighted lines in the below code the 6s were originally 3s and the 5s originally 2s.
    Please Login or Register  to view this content.

+ 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. Make a macro include whatever number of rows/columns when sorting out
    By axtryo in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-24-2015, 05:01 PM
  2. Replies: 1
    Last Post: 06-18-2014, 10:10 AM
  3. macro needed to include particular columns out of so many columns in a sheet
    By genetist in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-24-2014, 12:21 AM
  4. [SOLVED] Edit existing macro to include week change
    By adamsurpren in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-19-2012, 08:11 AM
  5. Macro to Change Source Data Columns
    By Jessy01 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 10-26-2010, 02:38 PM
  6. Macro to include addtional rows/columns
    By namz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-10-2008, 11:47 PM
  7. Excel macro to specify rows and columns to include in printouts
    By Generic Usenet Account in forum Excel General
    Replies: 2
    Last Post: 04-19-2005, 12:06 PM

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