+ Reply to Thread
Results 1 to 6 of 6

Chk row for cells with "1" then insert contents of cell to the left into another cell

  1. #1
    Registered User
    Join Date
    04-19-2019
    Location
    Pennsylvania
    MS-Off Ver
    Office 2013
    Posts
    2

    Chk row for cells with "1" then insert contents of cell to the left into another cell

    Hello all. I have a vacation tracker that we use to track what vacation days each employee has scheduled for each day of the month. I need to be able to, in another sheet that is formatted like a calendar, list all employees who are off on each day. My data sheet looks like the following:

    sheet1.example.png

    The next screen shot is of the calendar and what the results would look like after the script is run.

    sheet2.example.png

    I did an IF statement that worked... except that there would need to be an IF statement for every employee on each day of the month which didn't seem to be the most efficient. I'm open to any formulas or VBA that would accomplish this.

    I would greatly appreciate any guidance.

  2. #2
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,516

    Re: Chk row for cells with "1" then insert contents of cell to the left into another cell

    Instead of pictures, attach a representative workbook without private information like names, addresses, phone numbers, email addresses etc. In other words, sanitize the Workbook before attaching.
    It needs sufficient data to work with though.
    As an example why, your calendar picture has "April" showing but your little picture above it, no month shows. There be other things people that want and can help you need to know.
    Last edited by jolivanes; 04-19-2019 at 02:06 PM.

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,159

    Re: Chk row for cells with "1" then insert contents of cell to the left into another cell

    No idea what your setup is...but attached will give you an idea...Code works only for this file...
    Push button on sheet1...results sheet2

    Depending on your scenario, one could simplify the code...
    Attached Files Attached Files
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  4. #4
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,516

    Re: Chk row for cells with "1" then insert contents of cell to the left into another cell

    And another one to play around with.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    04-19-2019
    Location
    Pennsylvania
    MS-Off Ver
    Office 2013
    Posts
    2

    Re: Chk row for cells with "1" then insert contents of cell to the left into another cell

    Jolivanes, thank you so much for this. This helps a lot. Do you think it's possible for the Calendar to be arranged like a standard calendar, with the weeks being on separate rows?

  6. #6
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,516

    Re: Chk row for cells with "1" then insert contents of cell to the left into another cell

    There are a tremendous amount of calendars available for Excel.
    Following are just a couple of possibilities found with Google.

    https://www.wincalendar.com/Create-a...rom-Excel-Data

    https://www.smartsheet.com/ic/easies...calendar-excel

    Find one you want and then transfer the data into it.

+ 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. Replies: 4
    Last Post: 06-11-2017, 02:03 PM
  2. Code to recgonize non-numeric "Left"/start of cell in cells of dynamic column
    By horrockc in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-28-2016, 10:19 AM
  3. [SOLVED] If cell equals "CR" then make cell to left negative and delete "CR".......
    By pasqualebaldi in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-14-2016, 07:51 PM
  4. Replies: 1
    Last Post: 11-04-2015, 04:34 AM
  5. If cell equals "Y" then insert the contents of another cell
    By Ampmeister in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-27-2013, 09:22 PM
  6. Replies: 4
    Last Post: 02-12-2012, 05:46 PM
  7. Insert 19 cells "Shift to the right" if cell contains "->"
    By robertjtucker in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-25-2005, 11:20 AM

Tags for this Thread

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