techPowerUp! Forums

Go Back   techPowerUp! Forums > Software > General Software

Reply
 
Thread Tools
Old Feb 11, 2012, 08:43 PM   #1
lilkiduno
200 Posts
 
lilkiduno's Avatar
 
Join Date: Jun 2008
Location: Kansas City, Ks
Posts: 408 (0.23/day)
Thanks: 99
Thanked 48 Times in 46 Posts

System Specs

excel cell formating

Okay So i have been working on an excel spreadsheet for a good part of my day ~3 hours. I believe I have everything pretty much as I want/need it. It's nothing fancy by any needs for keeping track of bills. But I am trying to fromat my percent of change to be red if positive and black if negitive.

I for some reason Am having a hard time and can't seem to figure it out.

Any help would be greatly appericated.
Thanks,
lilkiduno
__________________
Signature is GREATLY done by SkyKast

“try using everything you can. it doesn't lock you out ... If not google it, or call MS, I'm sure they have a backdoor fix all password or some sort of "hop on one leg, rub your stomach, pinch your left nipple all while screaming out BILL! BILL! BILL!"” -Gilletter
“Minivans outsell Lambo's, does it make them better?” -1Kurgan1
lilkiduno is offline  
Reply With Quote
Old Feb 11, 2012, 09:13 PM   #2
Beertintedgoggles
500 Posts
 
Beertintedgoggles's Avatar
 
Join Date: Nov 2005
Posts: 692 (0.25/day)
Thanks: 63
Thanked 194 Times in 144 Posts

System Specs

What you're looking for is called conditional formatting. Highlight the cells you want, click on the Format header in the top toolbar (it'll be in a different place for Office 2010 but you're looking for the same thing). From there you can enter your condition values and set the formatting to do to the cell what you want when the condition is met. Additionally you can set multiple conditions for the same cells for example red when the value is below zero and black when the value is positive. You can have the whole cell change colors or just the text.
Beertintedgoggles is offline  
Reply With Quote
The Following 2 Users Say Thank You to Beertintedgoggles For This Useful Post:
Old Feb 12, 2012, 12:14 AM   #3
Completely Bonkers
2000 Posts
 
Completely Bonkers's Avatar
 
Join Date: Feb 2007
Posts: 2,415 (1.05/day)
Thanks: 582
Thanked 533 Times in 374 Posts

System Specs

You dont need conditional formatting (in your simple case)

1./ Highlight the cell you want to format.
2./ Format/Cells... and choose category "custom"
3./ In the Type: box enter: #,##0.00;[Red]-#,##0.00
4./ For percent format use 0.00%;[Red]-0.00%

Done.
__________________
... some things in life just drive you bonkers. Especially the rubbish you see in forum posts
Completely Bonkers is offline  
Reply With Quote
The Following 2 Users Say Thank You to Completely Bonkers For This Useful Post:
Old Feb 12, 2012, 12:19 AM   #4
Beertintedgoggles
500 Posts
 
Beertintedgoggles's Avatar
 
Join Date: Nov 2005
Posts: 692 (0.25/day)
Thanks: 63
Thanked 194 Times in 144 Posts

System Specs

You realize that's a more roundabout way of "conditionally formatting" the cells than using Conditional Format?

Of course if it works, knowing two ways to do it doesn't hurt.
Beertintedgoggles is offline  
Reply With Quote
The Following User Says Thank You to Beertintedgoggles For This Useful Post:
Old Feb 12, 2012, 01:25 AM   #5
Completely Bonkers
2000 Posts
 
Completely Bonkers's Avatar
 
Join Date: Feb 2007
Posts: 2,415 (1.05/day)
Thanks: 582
Thanked 533 Times in 374 Posts

System Specs

You realise that using the "conditional format" script on each cell will take up a lot more memory, and is a lot slower, than the simple cell format? It is also less robust to file conversion to other spreadsheet formats like OpenOffice etc.

One might not care if the condition is used just a handful of times. But in a spreadsheet with (potentially) tens of thousands of cells it can make a significant difference.

lilkiduno's spreadsheet appears simple and small. Both ways will work for him. However, I believe the most elegant solution is to follow the simplest and most efficient path. At all times. I'm against bloat and unnecessary complexity. It doesn't scale well.
__________________
... some things in life just drive you bonkers. Especially the rubbish you see in forum posts
Completely Bonkers is offline  
Reply With Quote
The Following User Says Thank You to Completely Bonkers For This Useful Post:
Old Feb 12, 2012, 05:31 AM   #6
Beertintedgoggles
500 Posts
 
Beertintedgoggles's Avatar
 
Join Date: Nov 2005
Posts: 692 (0.25/day)
Thanks: 63
Thanked 194 Times in 144 Posts

System Specs

Well I will conceed but only slightly. I started with a spreadsheet of 80,000 entries made by the rand function to be between -5 and 3 (picked for no good reason) then copied and pasted all as values and deleted all the function cells. Essentially left with 50 rows of 1600 entries of values between -5 and 3 and saved as the template. I tried both ways and did see the conditional format took up more memory... the resulting file was 1.44 MB on disk compared to 1.42 MB using the custom format. It doesn't appear to be much more memory intensive. Also, it's much easier for a regular user to understand what the heck is going on using conditional formatting.

Edit: Just tried it with a 92 x 3200 entry spreadsheet, only 5.18 MB compared to 5.17 MB. The slick part though, the custom formatting keeps the spreadsheet at exactly the same size as the original... didn't know that.

Last edited by Beertintedgoggles; Feb 12, 2012 at 05:42 AM.
Beertintedgoggles is offline  
Reply With Quote
The Following User Says Thank You to Beertintedgoggles For This Useful Post:
Old Feb 12, 2012, 10:06 PM   #7
Completely Bonkers
2000 Posts
 
Completely Bonkers's Avatar
 
Join Date: Feb 2007
Posts: 2,415 (1.05/day)
Thanks: 582
Thanked 533 Times in 374 Posts

System Specs

Healthy discussion
__________________
... some things in life just drive you bonkers. Especially the rubbish you see in forum posts
Completely Bonkers is offline  
Reply With Quote
The Following User Says Thank You to Completely Bonkers For This Useful Post:
Old Feb 22, 2012, 02:50 AM   #8
lilkiduno
200 Posts
 
lilkiduno's Avatar
 
Join Date: Jun 2008
Location: Kansas City, Ks
Posts: 408 (0.23/day)
Thanks: 99
Thanked 48 Times in 46 Posts

System Specs

Thank ALL you guys, Sorry I havn't been on in a while. I started a new job and its hours are different and early mourning so my sleeping has been all jacked up.

Quote:
Originally Posted by Completely Bonkers View Post
You dont need conditional formatting (in your simple case)

1./ Highlight the cell you want to format.
2./ Format/Cells... and choose category "custom"
3./ In the Type: box enter: #,##0.00;[Red]-#,##0.00
4./ For percent format use 0.00%;[Red]-0.00%

Done.
I used your percentage format except I changed the formating around a bit. I instead used [red]0.00%;[black]-0.00%

If anyone would like I can post my excel spreadsheet so you can look at it and change it to fit your own personal needs. My family and I have been trying to cut back on our bills andn save a little money where we can. So thats why I put this together and wanted the percentage to stand out in red when it was grater than the month before.

Things we have done recently includes
Spoiler
__________________
Signature is GREATLY done by SkyKast

“try using everything you can. it doesn't lock you out ... If not google it, or call MS, I'm sure they have a backdoor fix all password or some sort of "hop on one leg, rub your stomach, pinch your left nipple all while screaming out BILL! BILL! BILL!"” -Gilletter
“Minivans outsell Lambo's, does it make them better?” -1Kurgan1
lilkiduno is offline  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Import Data from Excel Cell to Word 2007 heavenlee General Software 6 Jul 27, 2011 01:59 AM
Formating a loptop evilwillie0614 General Hardware 11 Dec 20, 2009 06:56 PM
Excel help [I.R.A]_FBi General Software 3 Oct 28, 2008 09:35 AM
what is the difference in fat32 and NTFS HDD formating??? quasar923 General Hardware 36 Dec 14, 2007 10:41 AM
Formating Harddrive Krafter General Software 13 Jul 6, 2007 11:43 PM


All times are GMT. The time now is 02:29 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
no new posts