+ Reply to Thread
Results 1 to 2 of 2

Only column will be visible based on cell value(date)

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    05-16-2011
    Location
    Philippines
    MS-Off Ver
    Excel 365/Excel 2016
    Posts
    315

    Only column will be visible based on cell value(date)

    Hi All,

    I already had an idea of highlighting or activating column base on the latest date today. When the user open the workbook only column that has header of latest date will only be visible(aside column A&B) other column will be hide,is it possible?here is the piece of code that only highlight column with latest date as header.

    Private Sub Workbook_Open()
    Dim dte As Date, cfind As Range
    Worksheets("sheet1").Activate
    Range("A1").Select
    ActiveSheet.Cells.Interior.ColorIndex = xlNone
    dte = Date
    Set cfind = Rows("1:1").Cells.Find(what:=dte, lookat:=xlWhole)
    If cfind Is Nothing Then Exit Sub
    cfind.EntireColumn.Cells.Interior.ColorIndex = 6
    End Sub

  2. #2
    Forum Contributor
    Join Date
    05-16-2011
    Location
    Philippines
    MS-Off Ver
    Excel 365/Excel 2016
    Posts
    315

    Re: Only column will be visible based on cell value(date)

    Up for this

+ 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. [SOLVED] Change X by Date (but selct column based cell value)
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-23-2014, 12:07 PM
  2. Color Date Cell in Column based on Criteria
    By rlsublime in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-04-2013, 02:21 PM
  3. Replies: 10
    Last Post: 12-25-2009, 08:10 AM
  4. Resize Visible Rows based only on Visible Columns text
    By Zimbo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-22-2009, 10:55 AM
  5. Button Visible based on cell value
    By tmkkoservo in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-30-2009, 10:18 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