+ Reply to Thread
Results 1 to 5 of 5

Function Script Add All Days Used to one Cell Like CONCATENATE()

  1. #1
    Valued Forum Contributor realniceguy5000's Avatar
    Join Date
    03-20-2008
    Location
    Fl
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    951

    Function Script Add All Days Used to one Cell Like CONCATENATE()

    Good Day Everyone,

    I have a problem with the following script. I was hoping someone could take a look and advise.

    This script will add all the days used and place them in the same cell. For example if a person was working Mon (B2) and Tues(C2) the scipt will take the 2 enteries and add them to another cell (H2).so for the result would be (MON-TUE). The problem seems to be when I place Mon(B2) Tue(C2) and Weds(D2) In (H2) Results is (Mon - Weds). What I'm looking for is in (H2) is = (Mon,Tues, Weds)

    I added a test book to help explain and here is the script I'm using...

    Please Login or Register  to view this content.
    I call the script from a cell in Col(H) with this.

    Please Login or Register  to view this content.
    Thank You for taking the time to help, Mike
    Attached Files Attached Files
    Last edited by realniceguy5000; 06-08-2010 at 09:36 AM.

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Function Script Add All Days Used to one Cell Like CONCATENATE()

    Please Login or Register  to view this content.

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Function Script Add All Days Used to one Cell Like CONCATENATE()

    You need to adopt some form of consistency so either Mon-Fri is ok (as is Mon-Wed) or it isn't - ie Mon,Tue,Wed,Thu,Fri etc...

    Perhaps the below alternative might help ?

    Please Login or Register  to view this content.
    Bob's is obviously far simpler [and more robust]

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Function Script Add All Days Used to one Cell Like CONCATENATE()

    I would still advocate Bob's approach given the small ranges in use however the below is a slightly more robust version of the prior suggestion:

    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor realniceguy5000's Avatar
    Join Date
    03-20-2008
    Location
    Fl
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    951

    Re: Function Script Add All Days Used to one Cell Like CONCATENATE()

    Thanks for the quick responces...

    Bob and DonkeyOte

    I understand "consistency" that makes better sense anyway.I tested each script and the changes work for my needs, I appriciate your guys hard work.

    Thank You for taking the time to look and solve my problem.

    Mike

+ 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