Link to home
Start Free TrialLog in
Avatar of Sabealgo
Sabealgo

asked on

Using a macro to generate segregation lines

I am trying to create a macro that will generate a segregation line between each Rep's business (column A).  (see example - Sheet 2).
The sample attached has about 100 lines of data and three or four Reps.  However, my real data could contain upwards of 4,000 lines.  Also, I would like to automatically create a RED border around column F and columns Z, AA (as one double column).  The problem I am having, is that each time I generate the data, the number of lines changes.  I would want the macro to decide where the end of the data is and create the borders based on the end of the data.

Sheet 1 contains the data as it appears today.  
Sheet 2 contains the data with a sample of how I am trying to 'auto format'.

Any help or guidance would be greatly appreciated.

Thanks.
Avatar of Simon
Simon
Flag of United Kingdom of Great Britain and Northern Ireland image

Please post the sample worksheet you described in your question.
Avatar of Sabealgo
Sabealgo

ASKER

It is attached now.
Sample-Data.xlsx
Where do you want the top of the red border to be? Row 1? Row 2? Row 3?
ASKER CERTIFIED SOLUTION
Avatar of Simon
Simon
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you for your help.  This works exactly as I needed and you saved me a ton of time.