+ Reply to Thread
Results 1 to 4 of 4

Choose left 3 cell contents

  1. #1
    Registered User
    Join Date
    09-23-2004
    Posts
    4

    Choose left 3 cell contents

    I have a list of dates ( an entire year ) in the format -

    Mon 13 Dec 2004

    However I only need the list to contain weekedays i.e. and would like to use a simpla macro to delete the lines that start with Sat or Sun. I just can't figure out the syntax of the command as so far I have been trying stuff like

    If ActiveCell.Left(3) = "Sat" Then

    to no avail.

    Can anyone point out the correct syntax for me ?

    Thanks

  2. #2
    Registered User
    Join Date
    10-16-2004
    Posts
    7
    You can use this

    If mid(ActiveCell, 1, 3) = "Fri" then ' Where 1 is start of string, 3 is 3 characters
    msgbox "It's Friday"
    else
    msgbox "Not Friday yet"
    endif

    Regard

  3. #3
    Registered User
    Join Date
    09-23-2004
    Posts
    4
    Thanks, I'd forgotten about that one.

  4. #4
    Registered User
    Join Date
    09-23-2004
    Posts
    4
    I've just realised that the cell contents are merely dates (10/10/04) but its simply the formatting that shows up as Sun 10 Oct 2004. So I'll need to work out if the dates are saturday or sunday then delete the rows.

+ 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