+ Reply to Thread
Results 1 to 10 of 10

macro assistance to automate text entry in selected row if another range has text

  1. #1
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2016
    Posts
    957

    macro assistance to automate text entry in selected row if another range has text

    Hello,

    Looking for some additional assistance on a schedule project I've been working on, that would eliminate the manual process of selecting "DO" which represents "day off" for employees who have weekends off via a data validation process. Ideally I would like to select the row for the employee who would have weekends off and the macro would look at a range between c3 and ag3 for any cells that have "Sat" or Sun" in it and then based on that criteria the row that was selected would put the "DO" in the selected row, but in the column where "Sat" and "Sun" are listed in row 3. This would be a huge time saver. Any help would be greatly appreciated!
    Attached Files Attached Files
    Last edited by lilsnoop; 01-12-2013 at 12:45 PM.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: macro assistance to automate text entry in selected row if another range has text

    Right click the sheet tab and select view code and add the below code

    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    08-26-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    58

    Re: macro assistance to automate text entry in selected row if another range has text

    TRY THIS....

    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2016
    Posts
    957

    Re: macro assistance to automate text entry in selected row if another range has text

    Hello sixthsense. Thanks so much for looking into a solution to my problem. I tried your code and it didn't work for me. I'm not sure if it is conflicting with some other coding I have going on, which is in my sample above too. As every employee won't have weekends off it will be important for me to select which employees (individually) I want to have the "DO" in the weekend cells. Thanks again!

  5. #5
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: macro assistance to automate text entry in selected row if another range has text

    The code will run automatically when there is any change in C3 to Ag3 cells. Just try inputting Sat Or Sun in any of that range and see it will perform the task.

    Yes, I seen your another code for highlighting the current row / column but that one is SHEET SELECTION CHANGE EVENT and I have given you SHEET CHANGE EVENT so there won't be any conflict

  6. #6
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2016
    Posts
    957

    Re: macro assistance to automate text entry in selected row if another range has text

    Thanks sbehera! Your macro worked great for one selection and then I couldn't get it to work again for another row selection immediately afterwards.

    sixthsense-I'll give it another try!

  7. #7
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2016
    Posts
    957

    Re: macro assistance to automate text entry in selected row if another range has text

    sixthsense-I like what you've done, but it unfortunately puts the DO in every row for all employees and I would have to clear those fields for those employees that don't have weekends off. Any other idea?

  8. #8
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: macro assistance to automate text entry in selected row if another range has text

    Ok... to which employee (Row) i have to fix it for???

  9. #9
    Registered User
    Join Date
    08-26-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    58

    Re: macro assistance to automate text entry in selected row if another range has text

    may be this will do......sory was in hurry to post. so didn't do the test properly......


    Please Login or Register  to view this content.

  10. #10
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2016
    Posts
    957

    Re: macro assistance to automate text entry in selected row if another range has text

    Excellent! Thanks!

+ 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