ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Formatting Table within Excel (https://www.excelbanter.com/excel-discussion-misc-queries/49222-formatting-table-within-excel.html)

maacmaac

Formatting Table within Excel
 

I have ~50,000 rows of data that I need to analyze/format for easier
viewing. I want to create boxes/lines around data for each unique name
in a column. I have data in Column B. Everytime the name changes, I
want to create a new box and I also would like to Merge the cells if
possible. I am trying to write a Macro using a loop function but
having no luck. See attached spreadsheet for Raw Data and the desired
result is going to be.


+-------------------------------------------------------------------+
|Filename: Format Table.zip |
|Download: http://www.excelforum.com/attachment.php?postid=3894 |
+-------------------------------------------------------------------+

--
maacmaac
------------------------------------------------------------------------
maacmaac's Profile: http://www.excelforum.com/member.php...fo&userid=2959
View this thread: http://www.excelforum.com/showthread...hreadid=474183


Ken Wright

I would ALWAYS avoid merged cells whenever possible - They can cause you
more grief than many would believe possible.

As to what you are trying to achieve - Have you considered Conditional
formatting? You can apply it to a single column such that it will change
the colour/font etc of a cell when the data changes, or you can have the
entire row change font/colour when a cell in one column changes value when
going from one row to another. I do the exact same thing often to delineate
different sets of data.

As an example - assume that you had your data in Column B in B2:B2000, and
that every change in Column B was to be flagged in some way.

Select B3:B2000, do Format / Cond Formatting, change 'cell is' to 'formula
is' and put in

=B2<B3 choose a font/pattern and hit OK and you will see all the changes
flagged.

If your data was in B2:F2000 and you wanted the whole row from B:F to
change, then select B3:F2000, do Format / CF and make the formula the
following:-

=$B2<$B3 and again choose your font/pattern

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

------------------------------*------------------------------*----------------
It's easier to beg forgiveness than ask permission :-)
------------------------------*------------------------------*----------------



"maacmaac" wrote in
message ...

I have ~50,000 rows of data that I need to analyze/format for easier
viewing. I want to create boxes/lines around data for each unique name
in a column. I have data in Column B. Everytime the name changes, I
want to create a new box and I also would like to Merge the cells if
possible. I am trying to write a Macro using a loop function but
having no luck. See attached spreadsheet for Raw Data and the desired
result is going to be.


+-------------------------------------------------------------------+
|Filename: Format Table.zip |
|Download: http://www.excelforum.com/attachment.php?postid=3894 |
+-------------------------------------------------------------------+

--
maacmaac
------------------------------------------------------------------------
maacmaac's Profile:
http://www.excelforum.com/member.php...fo&userid=2959
View this thread: http://www.excelforum.com/showthread...hreadid=474183





All times are GMT +1. The time now is 09:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com