CABRLU63
asked on
VBA simple formatting qstn
I have 20 columns on my Sheet1
Columns A-D are filled with Location, Name1, Name2, Cost
the rest of Columns is just data per month.
I already have a Range and VBA to put grid all around my ranged cells.
I need a VBA code to put bolded line everytime Name1 (Column B) changes - so user can see "blocks" of data clearly.
Bolded line on the bottom of the last occurance of Name1
So if there is John Doe, Bill Smith...
After John Doe there will be a horizontal bolded line going all thru Col A thru Z (whatever 20th Col is)
Columns A-D are filled with Location, Name1, Name2, Cost
the rest of Columns is just data per month.
I already have a Range and VBA to put grid all around my ranged cells.
I need a VBA code to put bolded line everytime Name1 (Column B) changes - so user can see "blocks" of data clearly.
Bolded line on the bottom of the last occurance of Name1
So if there is John Doe, Bill Smith...
After John Doe there will be a horizontal bolded line going all thru Col A thru Z (whatever 20th Col is)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I realise that this suggestion changes the way you are working but I am going to throw it out there anyway.
Instead of masses of columns, you could use a datagrid format with the following columns:
Location,
Name1,
Name2,
Cost,
Value,
Month.
The value and month columns would replace your multiple columns. Rather than a column for each month there would be one column and in that column you specify the month or even the actual date on which the value has occurred. This would mean that there are multiple lines per Location/Name etc.
With the data in this format you could then use a Pivot Table to summarise the data and the formatting of the Pivot Table can be set so that there is clear delineation between names etc and would adjust each time the Pivot Table is refreshed.
Instead of masses of columns, you could use a datagrid format with the following columns:
Location,
Name1,
Name2,
Cost,
Value,
Month.
The value and month columns would replace your multiple columns. Rather than a column for each month there would be one column and in that column you specify the month or even the actual date on which the value has occurred. This would mean that there are multiple lines per Location/Name etc.
With the data in this format you could then use a Pivot Table to summarise the data and the formatting of the Pivot Table can be set so that there is clear delineation between names etc and would adjust each time the Pivot Table is refreshed.
ASKER
Rob Henson, I can't use Pivots. Not feasible for this project.
Open in new window