+ Reply to Thread
Results 1 to 7 of 7

Delete unwanted columns

  1. #1
    Forum Contributor
    Join Date
    08-10-2006
    Posts
    723

    Delete unwanted columns

    hi,

    in row 7 from column E i can have various number of dates of which
    one of the dates will be todays date. the date the macro was run

    i need to leave only 6 more columns after the todays date . as that is all i have to report on. therefore the others after the 6th column can be deleted then sum the 6 columns in the 7th column

    there could be lots of rows

    the dates before the todays date will stay

    thanks

    steve
    Last edited by stevekirk; 09-23-2006 at 07:06 AM.

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by stevekirk
    hi,

    in row 7 from column E i can have various number of dates of which
    one of the dates will be todays date. the date the macro was run

    i need to leave only 6 more columns after the todays date . as that is all i have to report on. therefore the others after the 6th column can be deleted then sum the 6 columns in the 7th column

    there could be lots of rows

    the dates before the todays date will stay

    thanks

    steve
    That it is 10:52pm Saturday could be the reason for my confusion, so I need to ask, the '7th' column, is that column G or the 7th column after the column which is thought to contain todays date. Do the 6 columns following the column thought to contain todays date, and the columns before said column, contain data or dates?
    If they contain data will that data be confused with a date (ie, numbers in the 38000 range?
    Or does your phrase " in row 7 from column E i can have various number of dates " mean to say that the dates go 'down' column E from row 7 onwards?

    Perhaps a small example of your data, and a small example of the expected outcome (as a .zip of your sample .xls) could help here.

    ---

  3. #3
    Forum Contributor
    Join Date
    08-10-2006
    Posts
    723

    delete unwanted columns

    hi,sample attached

    steve
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by stevekirk
    hi,sample attached

    steve
    SampleB is a sample of my testing code to show how you can achieve the deleting of columns etc.

    I have not yet worked out the formula to be inseted, but the remainder should be an indication of what you need to do what you want, the Msg boxes are just to display each step to you for your easy understanding.

    Is this in line with what you were seeking?

    ---
    Attached Files Attached Files
    Last edited by Bryan Hessey; 09-24-2006 at 02:16 AM.

  5. #5
    Forum Contributor
    Join Date
    08-10-2006
    Posts
    723

    delete unwanted columns

    hi,

    thats great all looks good, if possible can we hide the columns from e to todays date
    thanks steve

  6. #6
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    The attached SampleC should be close enough to your deletion for you to use.
    After you have tested this (and removed the displays as required) you will be able to add the line to hide columns, the format is
    Please Login or Register  to view this content.
    hth
    ---
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    08-10-2006
    Posts
    723

    delete unwanted columns

    Thanks Byran for all your help

    steve

+ 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