+ Reply to Thread
Results 1 to 8 of 8

Select only filled cells of a column and create a text file

  1. #1
    Registered User
    Join Date
    06-28-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    27

    Select only filled cells of a column and create a text file

    I need a macro to select only filled cells of Column C from C4 to last cell of C and then create a text file mentioning the serial numbers or row numbers of the filled cells and if there is no filled cell then either a text file should create mentioning “No Cell Found” or the text file should not create whichever is possible . The column C has a formula and the data is dependent on the formula. One more thing I already have a code suggested in this forum by a respected member for my other Column and one text file is also created by that code and saved in the same folder of my this excel workbook. The name of my sheet is “MySheet”.

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Select only filled cells of a column and create a text file

    Give this a try, update the path and filename to meet your needs:

    Please Login or Register  to view this content.
    Gary's Student

  3. #3
    Registered User
    Join Date
    06-28-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Select only filled cells of a column and create a text file

    Wonderful. Thanks Jakobshavn. Just one more thing, if the file mesage.txt could have Date and Time added like mesage 30-06-2013 17.10.txt and save at (parent directory) where excel file is saved.
    Last edited by Sam9; 06-30-2013 at 01:24 PM.

  4. #4
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Select only filled cells of a column and create a text file

    As you have requested:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-28-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Select only filled cells of a column and create a text file

    Thanks but now the file name is 30-06-2013 23.05 .txt. The file name mesage is not coming before the date. I need that name also.

  6. #6
    Registered User
    Join Date
    06-28-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Select only filled cells of a column and create a text file

    Thanks Jakobshavn. I did like this
    Please Login or Register  to view this content.
    Am I right or there is a better way to do this?

  7. #7
    Registered User
    Join Date
    06-28-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Select only filled cells of a column and create a text file

    Sorry, Jackobshavn, I am again. Your first advise was working fine but when I did as per second advise, now even if a cell in column C is filled, it is saying no cells found.

  8. #8
    Registered User
    Join Date
    06-28-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Select only filled cells of a column and create a text file

    Sorry, I am lokking for my mistake.

+ 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