Help for VBA script

%3CLINGO-SUB%20id%3D%22lingo-sub-1585881%22%20slang%3D%22en-US%22%3EHelp%20for%20VBA%20script%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1585881%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20need%20some%20assistance%20with%20writing%202%20VBA%20scripts.%20I%20have%20created%20a%20dummy%20data%20set%20for%20visual%20support%20that%20can%20be%20found%20below.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EScript%201%3A%20Counting%20subsequent%20days%20and%20inputting%20the%20results%20in%20a%20column%3C%2FP%3E%3CP%3EIn%20the%20Start%20sheet%2C%20I%20am%20attempting%20to%20fill%20the%20column%20D(Subsequent%20days)%20with%20text%20values%20indicating%20how%20many%20subsequent%20days%20an%20employee%20has%20worked.%3C%2FP%3E%3CUL%3E%3CLI%3EThe%20script%20has%20to%20answer%20the%20following%20objectives%3A%3CUL%3E%3CLI%3ESkip%20the%20rows%20with%20no%20employee%20names%3C%2FLI%3E%3CLI%3EDuplicates%20the%20text%20values%20in%20duplicate%20rows%20(see%20example)%3C%2FLI%3E%3CLI%3EFormat%20the%20values%20as%20following%3A%20%221%20day%22or%20%222%20days%22%20or%20%223%20days%22..etc%26nbsp%3B%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3EScript%202%3A%20Counting%20and%20highlighting%20the%20cells%20that%20answer%20a%20particular%20condition%3C%2FP%3E%3CP%3EIn%20the%20Summary%20sheet%2C%20I%20need%20to%20come%20up%20with%20a%20script%20that%20will%20highlight%20the%20cells%20in%20the%20Department%20column%20that%20have%202%20or%20more%20employees%20that%20worked%202%20or%20more%20days.%20I%20also%20need%20to%20count%20the%20number%20of%20departments%20that%20answers%20that%20condition%20and%20place%20the%20result%20in%20cell%20K1.%20(see%20example)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20kindly%20in%20advance%20for%20your%20help.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1585881%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
Occasional Visitor

Hello, 

 

I would need some assistance with writing 2 VBA scripts. I have created a dummy data set for visual support that can be found below.

 

Script 1: Counting subsequent days and inputting the results in a column

In the Start sheet, I am attempting to fill the column D(Subsequent days) with text values indicating how many subsequent days an employee has worked.

  • The script has to answer the following objectives:
    • Skip the rows with no employee names
    • Duplicates the text values in duplicate rows (see example)
    • Format the values as following: "1 day"or "2 days" or "3 days"..etc 

Script 2: Counting and highlighting the cells that answer a particular condition

In the Summary sheet, I need to come up with a script that will highlight the cells in the Department column that have 2 or more employees that worked 2 or more days. I also need to count the number of departments that answers that condition and place the result in cell K1. (see example)

 

Thank you kindly in advance for your help.

 

 

 

 

 

 

0 Replies