+ Reply to Thread
Results 1 to 3 of 3

Add Column and Fill with WS name

  1. #1
    Registered User
    Join Date
    08-09-2012
    Location
    phoenix, az
    MS-Off Ver
    Excel 2010
    Posts
    10

    Add Column and Fill with WS name

    I am trying to use a macro to insert a column with B1 called "domain" and then fill the rest of the worksheet (wherever it may end) with the worksheet name.

    the CSV that I open up has the domain name as the worksheet (example excel.com). I want to take that and fill B2 and all the way down to where the data ends. Its random for each spreadsheet.

    I was able to record a macro to insert the column, but I just cant seem to figure out how to get the ws name and fill that in the rest of the column.

    Or, can I pull the filename (minus extension) and fill the column?

    thanks in advance!

    Chris
    Last edited by cheezehead; 09-04-2012 at 01:57 PM.

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Add Column and Fill with WS name

    This sample will take the last row in column A and fill in the worksheet name starting in B2 down to the length of A but starying in column B.

    Hopefully you can work this into what you currently have...

    Please Login or Register  to view this content.
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    08-09-2012
    Location
    phoenix, az
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Add Column and Fill with WS name

    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