Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: If statements in Excel worksheets.

05 Aug 2011   #1
BomberAF

Windows 7
 
 
If statements in Excel worksheets.

How do you add if statements to formula in Excel that change the formating of the cells.

For instace:

If I have a sum which subtracts one cell from another and I want the colour of the text in the results cell to turn red if the value becomes negative.

And:

If I have a number in a cell and while the number is say 8 then that is fine so I want nothing to change, but if the number becomes say 3 then I want the colour of text in the cell to turn red, how would I go about it.

Regards

AF


My System SpecsSystem Spec
.

05 Aug 2011   #2
mjm6783

XP Professional, 7 Professional
 
 

Man, I haven't had to try this in a long while. I remember it used to be a rule menu called "conditional formatting", but I've never tried it in newer versions of excel. Give me a minute and I try to reacquaint myself.

EDIT: Home tab, Conditional formatting is it's own button
My System SpecsSystem Spec
05 Aug 2011   #3
jimbo45

Linux CENTOS 7 / various Windows OS'es and servers
 
 

Hi there
probably the easiest way is to start to RECORD a Macro (open the development developers ? tag and chose start recording.

Do your IF or whatever you want in the cell(s) then STOP RECORDING and then look at the VBA code.

Other than that look at the excel help == I know there are a load of string / conditional formatting statements.

If you know the range of cells relative to the start column it's probably best to have this in a macro whenever data is entered into the appropriate cells.

Cheers
jimbo
My System SpecsSystem Spec
.


05 Aug 2011   #4
BomberAF

Windows 7
 
 

Quote   Quote: Originally Posted by mjm6783 View Post
Man, I haven't had to try this in a long while. I remember it used to be a rule menu called "conditional formatting", but I've never tried it in newer versions of excel. Give me a minute and I try to reacquaint myself.

EDIT: Home tab, Conditional formatting is it's own button

Thanks for that, I was expecting a pain in the arse formula would have to be inserted but Excel does all the hard work for you.

Cheers
My System SpecsSystem Spec
05 Aug 2011   #5
BomberAF

Windows 7
 
 

Quote   Quote: Originally Posted by jimbo45 View Post
Hi there
probably the easiest way is to start to RECORD a Macro (open the development developers ? tag and chose start recording.

Do your IF or whatever you want in the cell(s) then STOP RECORDING and then look at the VBA code.

Other than that look at the excel help == I know there are a load of string / conditional formatting statements.

If you know the range of cells relative to the start column it's probably best to have this in a macro whenever data is entered into the appropriate cells.

Cheers
jimbo
Thanks for the help but I think the conditional formating will be much easier than having to arse around with macro's.
My System SpecsSystem Spec
Reply

 If statements in Excel worksheets.




Thread Tools





Similar help and support threads
Thread Forum
How do I turn off worksheets in w7 calculator?
Once a worksheet is selected there is no apparent way to turn off worksheets. You can switch between different worksheets, but you can't turn them off.
General Discussion
Need software to find duplicates in excel worksheets
Dear All, Can you plz suggest me a software that can find duplicate texts present in an excel file? I know there is an option called "Remove Duplicates" under Data section in excel, but it can only find duplicates present in the current worksheet. What i am looking for will allow me to...
Software
How to download bank statements
OK...I give up; with Win7 and IE8; when I log into my bank account and try to download the pdf file of my statement; it says that it cannot do it for security reasons. I've tried everything I can think of. What do I have to change to allow it to download these pdf files? Thanks, / GE
Microsoft Office
Win 7 calculator worksheets
Does anyone know how to make worksheets for the Win 7 calculator? Thanks, Todd
General Discussion
PDF Statements from Secure Sites
Maybe this is only happening to me, but I will pass along some information just in case. I was having problems downloading my bank statements (.pdf format) from my banking website. I would click to view the statement, and address bar and progress bar seemed to behave normally, but no statement...
Software

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd

All times are GMT -5. The time now is 16:05.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App