+ Reply to Thread
Results 1 to 3 of 3

Need to delete column based on date value in cell

  1. #1
    Registered User
    Join Date
    10-16-2016
    Location
    USA
    MS-Off Ver
    Excel
    Posts
    7

    Need to delete column based on date value in cell

    I am very new to VBA, in process of learning. I'm looking to delete column "C" based on the actual calander date. Ex., If I open the worksheet on 9/22, I would like for the column containing the date 9/21 to be deleted. Shift all columns to the left, and then in column "I", fill in the next date. Also, I may have row 1 set up incorrectly. I would like for column "C" to be the current date, followed by at least 6 consecutive days. I have attached my workbook. Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,877

    Re: Need to delete column based on date value in cell

    Put this in the workbook_open event

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: Need to delete column based on date value in cell

    dusty90,

    Here's how I read your problem.
    To ThisWorkbook code module.
    Please Login or Register  to view this content.

+ 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. Delete rows based on matching dates in Sheet1 Column A with date in Sheet2 Cell K1
    By robertaw in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-24-2015, 02:30 PM
  2. [SOLVED] Delete contents of cells based on the date in the first cell of the row(s)l
    By ronwee in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-11-2014, 01:42 AM
  3. Replies: 3
    Last Post: 11-23-2013, 06:21 AM
  4. [SOLVED] Delete range of cells based on a cell value (Date).
    By pipoliveira in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-06-2013, 05:21 AM
  5. [SOLVED] Delete Column based on cell value
    By JJGF in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-21-2012, 02:03 AM
  6. Need help with code to delete row based on date in column J
    By cariwest in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-28-2012, 01:06 PM
  7. Can you delete a column based on a cell value?
    By iwilli in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-24-2012, 01:39 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