+ Reply to Thread
Results 1 to 9 of 9

new sheets created with a template and populated with data when conditions are met

  1. #1
    Registered User
    Join Date
    03-18-2014
    Location
    port vila, vanuatu
    MS-Off Ver
    Excel 2010
    Posts
    12

    new sheets created with a template and populated with data when conditions are met

    I have a workbook with three sheets: Collections, Client and Interest
    New sheets created from a range in Sheets("Interest"). The range in Sheets("Interest") holds the client names.
    Then the template in Sheets("Client") is copied and pasted into the new sheets

    For each new sheets cell B6 holds the client name and .Range("A10:A1317") holds the dates
    Sheets("Collections").Range("D10:D1317") holds the dates and .Range("D8:WC8") holds the Client Names
    if Sheets("Collections").Range("D8:WC8") = new sheet.cells(6, 4) then
    if Sheets("Collections").Range("D10:D1317") = new sheet .range("A10:A1317") then
    copy the value in Sheets("Collections").Range("D10:WC10").offset(0, 3) to new sheet .Range("C10:C1317")
    end if
    move down on row and repeat the steps

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

  2. #2
    Registered User
    Join Date
    11-13-2006
    Posts
    87

    Re: new sheets created with a template and populated with data when conditions are met

    Please Login or Register  to view this content.
    Edit to Add: now I come back and see that the ranges in your code do not match the ranges in your text.
    Last edited by SamT; 03-25-2014 at 12:36 AM.

  3. #3
    Registered User
    Join Date
    03-18-2014
    Location
    port vila, vanuatu
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: new sheets created with a template and populated with data when conditions are met

    after the new client sheet is filled by setting value of cell B6 in new sheet same as Sheet tab name, i need to populate the other cells in the new client sheet as well.

    Sheets("Collections").Range("D10:D1317") holds the dates
    Sheets("Collections").Range("D8:WC8") holds the Client Names

    if Sheets("Collections").Range("D8:WC8") = new sheet.Range(B6) then (Client name matches)
    if Sheets("Collections").Range("D10:D1317") = new sheet .range("A10:A1317") then (Date Matches)
    copy the value in Sheets("Collections").Range("D10:WC10").offset(0, 3) to new sheet .Range("C10:C1317")
    end if

    do this until all data on Collection Sheet is posted in each client worksheet. Also when new data is input it should append if new and update if modifying.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    11-13-2006
    Posts
    87

    Re: new sheets created with a template and populated with data when conditions are met

    That is an xlsx book. There is no code in an xlsx book.

  5. #5
    Registered User
    Join Date
    03-18-2014
    Location
    port vila, vanuatu
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: new sheets created with a template and populated with data when conditions are met

    excel file reloaded as xls book
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    03-18-2014
    Location
    port vila, vanuatu
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: new sheets created with a template and populated with data when conditions are met

    Excel with code
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    11-13-2006
    Posts
    87

    Re: new sheets created with a template and populated with data when conditions are met

    I added colors to the workbook. In Sheet Collections the Source Cells are different colors. In sheets test1 and test2, the destination cells match the colors in Collections.

    Is this what you want?
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    03-18-2014
    Location
    port vila, vanuatu
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: new sheets created with a template and populated with data when conditions are met

    yes that is what i want

  9. #9
    Registered User
    Join Date
    03-18-2014
    Location
    port vila, vanuatu
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: new sheets created with a template and populated with data when conditions are met

    I need help for the macro to automatically fill in the fields when i have more than 20 customers.

+ 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. [SOLVED] Copy data from raw to template based on 2 conditions
    By hcyeap in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-21-2013, 12:13 PM
  2. under what conditions is an excel cell considered populated.......
    By john/nyc in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-02-2013, 12:14 AM
  3. [SOLVED] Copy a template to every worksheet created
    By emina002 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-01-2012, 10:55 PM
  4. CSV file created from template is not saving to same location as the template.
    By SGALLAG1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-12-2012, 11:26 AM
  5. [SOLVED] new sheet created 'on the fly' from template in same workbook - H.
    By MrT in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-10-2005, 04:06 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