Solved

excel formatting

Posted on 2016-09-13
5
46 Views
Last Modified: 2016-09-13
I have an excel spreadsheet that has thousands of billing line items.
Column A lists the accountnumber and it is ordered by accountnumber.... low to high

so for example..... account 1111 might have 3 rows.  one row for each billing line item... ie... phone bill, garbage bill, sewer bill
account 2222 might only have 2 rows...   electric bill, garbage bill

i'd like to color the rows with a ledger style row color... by account.
meaning   account 1111... its 3 rows would be light green
account 2222's 2 rows would be white
account 3333's rows would revert back to light green.

is there a way to do this.  I really don't care what colors they are... just as long as they are light and transparent
attached is a manually created file that looks like what I am talking about.
experts-help.xlsx
0
Comment
Question by:jamesmetcalf74
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 33

Accepted Solution

by:
Rob Henson earned 500 total points
ID: 41796227
You can do that with Conditional formatting.

Insert a column to the left of the data, making this column A.

In A2 type 1 and then in the rest of column A have the following formula:

=IF(B3=B2,A2,-A2)

Copied down, this will alternate between 1 and -1 for each account.

Then for the conditional formatting:

Select all the data, excluding headers
Click on Home Ribbon > Conditional Fomatting and Choose New Rule
Select Use a formula to determine which cells to format
Enter formula =$A2=1   (note use of $ for column A, if you have used a different column adjust that)
Format as required for one colour eg pale green fill
Click OK

Assuming the cells are currently just white/no fill, only those with 1 in column A will now be pale green.
1
 

Author Comment

by:jamesmetcalf74
ID: 41796262
that worked like a charm but....   when i delete column a (the 1 and -1 column)  the formatting disappears.

which makes sense since it is formatting off that data.
is there a way to make the formatting stick and delete the column i am using.
0
 
LVL 33

Expert Comment

by:Rob Henson
ID: 41796267
Simple answer is no, just hide it instead.
0
 

Author Closing Comment

by:jamesmetcalf74
ID: 41796273
Thanks Rob-
This will make working with the data much easier
0
 
LVL 31

Expert Comment

by:Subodh Tiwari (Neeraj)
ID: 41796293
Nice solution Rob! :)
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question