Formatting Table within Excel

M

maacmaac

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 |
+-------------------------------------------------------------------+
 
K

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 :)
------------------------------­------------------------------­----------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Time formatting 2
Shading problem 3
Copying data different sheet 2
Pivot Table or something? 1
Pivot Table or Something! 1
Excel Formula question 2
Conditional Formatting 1
Lookup Formula 7

Top