+ Reply to Thread
Results 1 to 11 of 11

Macro for creating column headings and coping data into these cells

  1. #1
    Registered User
    Join Date
    08-22-2012
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    51

    Macro for creating column headings and coping data into these cells

    Hi

    I need a macro that will create 4 headings in the following columns

    T2 = column and cell

    T2: Istenant U2: IsorderNone V2: IsorderRef W2:IsOrderforOther

    I then need the macro to copy data from the same spreadsheet and place the corresponding data into the above columns. I need to specify the columns where the data lives in which I need to copy from, not the range. E.g. T2:T500 – it needs to be based on the column..e.g. T:T

    Important: I need the macro to stop inputting data at the last line of data from where its copying from.

    Please advise, much appreciated

    Thanks

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    Where exactly are you copying from?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    08-22-2012
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Macro for creating column headings and coping data into these cells

    Hi sorry

    Copying from columns J:J K:K L:L M:M

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    Still not 200% clear, can you attach a sample workbook to clarify things?

  5. #5
    Registered User
    Join Date
    08-22-2012
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Macro for creating column headings and coping data into these cells

    Hi please see file attached. I have explained differently in column R
    Attached Files Attached Files

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

    Re: Macro for creating column headings and coping data into these cells

    matthew

    I'm a little confused.

    Why does columns V have 0s in it when there's data in the column to the left, U?

  7. #7
    Registered User
    Join Date
    08-22-2012
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Macro for creating column headings and coping data into these cells

    Hi, the 0 doesn't mean there's no content on the left. There just needs to be 0's in that column. But we only want the cells to be filled with 1's and 0's if there there is content on the left

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

    Re: Macro for creating column headings and coping data into these cells

    But there is content to the left of column V, column U is filled with 1s.

  9. #9
    Registered User
    Join Date
    08-22-2012
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Macro for creating column headings and coping data into these cells

    The columns with 0's and 1's doesn't mean anything, however they need to remain the same. I just want the 1's to be entered where there is content on the left and 0's also. T U V and W only need to be filled in if the other cells to the left have content in them

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

    Re: Macro for creating column headings and coping data into these cells

    Which columns to the left are you referring to?

    The columns immediately to the left P,Q,R and S all have values in each row.

    The only columns with empty rows are C, F with 2 empty row, L and M.

  11. #11
    Registered User
    Join Date
    08-22-2012
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Macro for creating column headings and coping data into these cells

    Hi sorry about the confusion. I have just checked the spreadsheet.

    If row Q has data in it, then cell T and U needs to have a 1 inputted and V and W needs to have a 0 inputted.

    If there is no data in row Q, then nothing should be entered into these cells.

    I hope this is enough info

+ 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