+ Reply to Thread
Results 1 to 7 of 7

Macro/Formula to skip or omit values from weekends to just weekdays.

  1. #1
    Registered User
    Join Date
    05-20-2012
    Location
    Taiwan
    MS-Off Ver
    Office 365
    Posts
    47

    Post Macro/Formula to skip or omit values from weekends to just weekdays.

    Hi,

    I have been trying hard but I can't figure out on how to rearrange a list of values to skip or omit weekends to just weekdays.

    Please refer to the attached file, from the "Original" tab to the "Desired" tab.

    Can anyone help?

    Regards.

    escapes_example.xlsx

  2. #2
    Valued Forum Contributor
    Join Date
    08-13-2012
    Location
    Gardony, Hungary
    MS-Off Ver
    Excel 2003
    Posts
    558

    Re: Macro/Formula to skip or omit values from weekends to just weekdays.

    Hi,

    try this formula in C2 and copy down.
    =IF(A2="Saturday","",IF(A2="Sunday","",B2))

  3. #3
    Registered User
    Join Date
    05-20-2012
    Location
    Taiwan
    MS-Off Ver
    Office 365
    Posts
    47

    Re: Macro/Formula to skip or omit values from weekends to just weekdays.

    Hi,

    Thank you for your reply.

    I need the same set of values from "Saturday" & "Sunday" to populate on the next following "Monday" & "Tuesdays" onwards. Not just "blanks".

    Not sure if this is possible.

  4. #4
    Valued Forum Contributor
    Join Date
    08-13-2012
    Location
    Gardony, Hungary
    MS-Off Ver
    Excel 2003
    Posts
    558

    Re: Macro/Formula to skip or omit values from weekends to just weekdays.

    Try running this macro when the active sheet is the original sheet. It will populate column C.

    Please note that the macro assumes that the first day in A2 cell is Monday. If it isn't, insert one or more rows so that it starts with Monday and add dummy data.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-20-2012
    Location
    Taiwan
    MS-Off Ver
    Office 365
    Posts
    47

    Re: Macro/Formula to skip or omit values from weekends to just weekdays.

    Hi!

    Thank you, I finally see some light that it can be possible.

    The macro you provided omits the last value in "B:B" when populating to "C:C".

    Regards.

  6. #6
    Valued Forum Contributor
    Join Date
    08-13-2012
    Location
    Gardony, Hungary
    MS-Off Ver
    Excel 2003
    Posts
    558

    Re: Macro/Formula to skip or omit values from weekends to just weekdays.

    Glad it works. I think it will include the last value if you change this line
    Please Login or Register  to view this content.
    to this:
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    05-20-2012
    Location
    Taiwan
    MS-Off Ver
    Office 365
    Posts
    47

    Re: Macro/Formula to skip or omit values from weekends to just weekdays.

    Thank you!

+ 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