Closed Thread
Results 1 to 11 of 11

fill down specific columns with specific text

  1. #1
    Registered User
    Join Date
    03-06-2014
    Location
    Denmark
    MS-Off Ver
    Excel 2010
    Posts
    83

    fill down specific columns with specific text

    Hello

    I need to fill down certain columns in a spreadsheet - I have a original spreadsheet, which I have reorganised by other VBA codes - but now I just need the last thing - I have converted the spreadsheet to a table.

    Now I just need to fill in like 7 columns with text, not the header though.

    So How do I fill in for example column I from row 2 down to a row which should depend on another column, E for example?

    Can anyone help in this matter?

    Kind regards

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: fill down specific columns with specific text

    range("b2:b" & worksheets("Sheet1").usedrange.rows.count).value="VALUE" where 2 is your last populated row
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: fill down specific columns with specific text

    Maybe:

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    03-06-2014
    Location
    Denmark
    MS-Off Ver
    Excel 2010
    Posts
    83

    Re: fill down specific columns with specific text

    okay thanks - i've asked in another thread, couldn't figure out how to delete it.
    I have created a sheet called job1 where my original data has to be put in.
    then I need to change it to a table - I just used the recorder - but what if I want it to use column E as reference for how many rows there are, and it needs to take 120 columns, what needs to change so that I always targets the sheet called job1 and count the rows that one has in E and make a table of 120 columns (with headers) and count it down to the last row in E?

    Please Login or Register  to view this content.

    this is the code I have to insert the values in the different columns - but it fails at the start..
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-06-2014
    Location
    Denmark
    MS-Off Ver
    Excel 2010
    Posts
    83

    Re: fill down specific columns with specific text

    Quote Originally Posted by JOHN H. DAVIS View Post
    Maybe:

    Please Login or Register  to view this content.
    how to I put in the value that I need the different columns to have.
    For example column 25 needs to have the word "test" from row 2 down to the last row, which is defined by column E...

  6. #6
    Registered User
    Join Date
    03-06-2014
    Location
    Denmark
    MS-Off Ver
    Excel 2010
    Posts
    83

    Re: fill down specific columns with specific text

    Quote Originally Posted by JOHN H. DAVIS View Post
    Maybe:

    Please Login or Register  to view this content.
    how to I put in the value that I need the different columns to have.
    For example column 25 needs to have the word "test" from row 2 down to the last row, which is def

    this one works partly:

    Please Login or Register  to view this content.
    But it doesn't stop at the last row, so it just fills in way to many rows..how to make it stop when column E doesn't have text/value in the cells anymore, ie. when the blank starts..?

  7. #7
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: fill down specific columns with specific text

    "For example column 25 needs to have the word "test" from row 2 down to the last row, which is def

    this one works partly:

    Please Login or Register  to view this content.
    But it doesn't stop at the last row, so it just fills in way to many rows..how to make it stop when column E doesn't have text/value in the cells anymore, ie. when the blank starts..? "

    Maybe?

    Please Login or Register  to view this content.

  8. #8
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: fill down specific columns with specific text

    Not sure what you're after. Post 6 should have worked. Maybe you want this instead?

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    03-06-2014
    Location
    Denmark
    MS-Off Ver
    Excel 2010
    Posts
    83

    Re: fill down specific columns with specific text

    Quote Originally Posted by JOHN H. DAVIS View Post
    Not sure what you're after. Post 6 should have worked. Maybe you want this instead?

    Please Login or Register  to view this content.
    yea exactly, thanks a lot thank you !

  10. #10
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: fill down specific columns with specific text

    You're welcome. Glad to help out and thanks for the feedback. Please mark this thread as solved.

  11. #11
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: fill down specific columns with specific text

    Thread posted in Commercial services, hence closed.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Macro Help to add new rows and fill data for specific columns
    By 5enses in forum Excel General
    Replies: 4
    Last Post: 06-18-2014, 03:28 PM
  2. Programming to automatically send text to specific sheets and specific columns.
    By GlobalExcelller in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-21-2014, 10:07 PM
  3. I would like A1 to auto fill with a specific tect if 3 other cells contain specific text
    By Mattyevs1000 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-09-2014, 03:35 PM
  4. Replies: 1
    Last Post: 09-11-2013, 12:12 AM
  5. Fill cells with x's between 2 specific columns
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-30-2005, 01:40 AM

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