The Code Cage - Microsoft Office help Free Microsoft Office Help for all Applications!  

To stop seeing these ads and get other benefits check This page!



» Online Users: 222
1 members and 221 guests
Ron Coderre
Most users ever online was 342, 18th January 2010 at 07:02 PM.
» Stats
Members: 1,367
Threads: 270,916
Posts: 1,021,555
Top Poster: Simon Lloyd (1,646)
Welcome to our newest member, malstan







» Today's Help
Sponsored Links

online casino bluebook - online casino gambling guide, to top ranked online casinos and reviews of over 200 gambling related websites. www.onlinecasinobluebook.com also host a casino forum, blog, and casino news articles
Working with functions (Basic)
Now that you know how to start a formula and have a very basic knowledge of them we will discuss and example a few of the different functions.

You have already met SUM where you can unconditionally total all the cells in your given range, however it has a more versatile counterpart SUMIF, and yes it is as it sounds SUM IF, add something if something is true, take a look at the picture:

As you can see we have 20 items in column A and 20 numbers in column B if this was a simple SUM our answer would be 30, but because of the power of SUMIF we can just total those numbers that match our criteria in this case its "February"

Our formula is written in this fashion =SUMIF(Range, Criteria, Sum Range) so we used =SUMIF(A1:A20,"February",B1:B20), you don't have to stick to adjacent ranges or even different ranges take a look at this =SUMIF(B1:B20,1,B1:B20) this will give a total of 10 as there are ten 1's.

Moving on we have the following functions COUNT, COUNTA, COUNTIF, COUNTBLANK, the difference here is these don't total what's in a cell they merely count the cells, COUNT merely counts the amount of cells that contain numbers, COUNTA will count all cells that contain either a number or text (or both), COUNTIF works the same as our SUMIF, but only COUNTS cells that match our criteria and only works on one range like this =COUNTIF(A1:B20,"February") and will return 7 and COUNTBLANK....well you can work that one out.
Previous Help
Previous Apperances

User Defined Function (UDF) in VBA


Building your first formula

All formulae must start with an equals symbol =, they mostly also contain open and close parenthesis ()

This =A1+B1 is the same as =(A1+B1), you will find that in future you will always build your formulae using the (), ALL functions use the parenthesis.

Lets look at summing many cells, you could do this =A1+B1+C1+.......H1 or you could wrap them in the () whichever way would be the same, however the smarter easier to read version would be =SUM(A1:H1), using SUM in our formula tells Excel that we want to add up each cell in that range, using this neat way not only looks smarter but has advantages over the longer version without parenthesis when manipulating the formula like this =SUM(A1:H1)/2+3*2 in this example we first find our total for the range and then perform mathematical manipulations to that total.

As your formulae will probably be longer than that it is useful to understand an important function, take our example =SUM(A1:H1)/2+3*2 without manually adding up the values in A1:H1 you would have no idea what value you are dividing by 2, adding 3 and multiplying by 2!

A neat trick is to highlight parts of your formula like =SUM(A1:H1) in your formula bar and then press F9 you will then see the value change from =SUM(A1:H1) to the actual total, so in my case it would be 36/2+3*2 which gives the result 24.

One thing to note with using F9 to evaluate a formula or part of a formula is, if you were to hit ENTER the evaluated part of the formula becomes that static evaluated figure which in my case would be 36, the way to combat this is don't press ENTER but hit ESC instead


Anything I have misquoted, misunderstood or simply missed feel free to correct me or supply a submission for entry to these pages, raise a ticket here at our Helpdesk and let us have your suggestion.
» Donation Support
Your Donation Will Be Used To Pay For our ever increasing bandwidth costs, our hosting Service, domain registration, software licensing fees, and maintenance costs
Site Costs [ Loading Progress Bar ]
Received £0.00 with 0 contributors Ends February 23rd, 2010
» Recent Threads
  RatingTitle, Username, & Date Last Post Replies Views Forum
RE: Changing Part-Number (Primary Key)
Fred
Today 02:07 PM
Today 02:07 PM
by Fred
0 1 Access Tables
Creating Global Data
CalgaryBob
Yesterday 09:28 PM
Today 02:05 PM
by John Goldsmith_Visio_MVP
5 20 Charts & Timelines
No Primary Key!
Bob Vance
Today 12:06 AM
3 19 Access Database Functions
yahoo mail error 8x800ccc0cf
AnonUK NotRequired
Today 01:59 PM
Today 01:59 PM
by AnonUK NotRequired
0 1 Outlook Functions
Extracting Digits From Text
Faraz A. Qureshi
Today 01:59 PM
Today 01:59 PM
by Faraz A. Qureshi
0 1 Excel VBA Programming
SaveAs - prevent overwriting existing file?
fisch4bill
Yesterday 09:35 PM
Today 01:57 PM
by fisch4bill
2 19 Word VBA Programming
ANTIVIRUS FREE DOWNLOAD 4977
antivirus gratis
Today 01:57 PM
Today 01:57 PM
by antivirus gratis
0 1 Charts & Timelines
VISIO Tool Download - VISIO network diagrams in...
Betty Carson
Today 01:57 PM
Today 01:57 PM
by Betty Carson
0 1 Charts & Timelines
Consolidation if a least one criteria is met
Nicawette
Today 12:23 PM
Today 01:56 PM
by Ashish Mathur
4 24 Worksheet Functions
How to determine char or number?
Eric
Today 01:05 PM
Today 01:50 PM
by Jacob Skaria
2 23 Excel Miscellaneous
Removing duplicates - Excel 2007
LMK@work
Today 01:21 AM
Today 01:50 PM
by Homey
2 24 Excel Miscellaneous
Copy cell contents, then paste into the same cell...
bluenote31
7th February 2010 08:48 AM
Today 01:50 PM
by Ron Rosenfeld
4 32 Excel Miscellaneous
Resolve conflicts on Shared Workbook
KevHardy
Today 01:50 PM
Today 01:50 PM
by KevHardy
0 1 Excel Miscellaneous
Macro required please
Dr Hackenbush
Today 11:39 AM
Today 01:50 PM
by Per Jessen
1 18 Excel Miscellaneous
OL 2010 to OL 2009
MinConst
Today 01:50 PM
Today 01:50 PM
by MinConst
0 7 Outlook Functions
changing a name in mulit parts of a document
rah2309
Today 12:44 PM
Today 01:50 PM
by Pesach Shelnitz
2 21 Document Properties & Formatting
TIPS FOR HEALTHY AND BEAUTY TIPS
sabi
Today 01:50 PM
Today 01:50 PM
by sabi
0 13 Document Properties & Formatting
hey
Tina Hosier
Today 01:50 PM
Today 01:50 PM
by Tina Hosier
0 14 Access Database Functions
Stock control spreadsheet
Rocket
Today 01:50 PM
Today 01:50 PM
by Rocket
0 20 Worksheet Functions
Stock control formula
Rocket
Today 01:50 PM
Today 01:50 PM
by Rocket
0 17 Worksheet Functions
» News
I am new.
Feb 02, 2010 - 9:11 AM - by nevaeh.aaric
Hello,

Friends this is Nevaeh.
I am newbie here and this is my first visit also. I am here to get some knowledge about SEO. I am very happy to join this forum
I am actually looking forward to learning more about SEO.
... [Read More]
75 Views
Forum progress news!
Jan 26, 2010 - 2:06 PM - by Simon Lloyd
Thanks to all our visitors and members The Code Cage is doing well, we are now at Page Rank 3 ( see at the bottom of our Homepage) and our ... [Read More]
74 Views
Excel - Simple Conditional Formatting
Jan 23, 2010 - 8:55 AM - by Simon Lloyd
Top Tip
Submitted By: Simon Lloyd
... [Read More]
106 Views
Wrapping your code submissions
Jan 22, 2010 - 7:58 PM - by Simon Lloyd
When posting code to illustrate your problem or provide a sample of what you're using we ask that you wrap your code in code tags, this makes the code easier to read and follow.

You can wrap your code in one of 3 ways:
1. you can... [Read More]
90 Views
Excel - Run macro in 2 parts with same button
Jan 20, 2010 - 5:35 PM - by Simon Lloyd
A new entry has been added to Code Cage Downloads, category Excel VBA

Description: On first click of a command button run one section of code, on second click run second section.

Ever wanted to use the same command... [Read More]
95 Views
Excel - Use Option Explicit
Jan 07, 2010 - 12:43 PM - by royUK
Top Tip
Submitted By: royUK
... [Read More]
149 Views
Excel - remembering hidden columns
Jan 07, 2010 - 2:45 AM - by teylyn
Top Tip
Submitted By: teylyn
... [Read More]
100 Views
[SOLVED]: Welcome suggestions on making a Matching Quiz!
Dec 23, 2009 - 9:25 AM - by charlene
Hi, have anyone ever made a Flash matching quiz? I think it is wonderful to make such a quiz for assessment, learning and fun. Could you give me some suggestions on it?
294 Views
» The Code Cage Ranking
Page Rank Check
Visitors To This Page
Powered by vBadvanced CMPS v3.1.0
The Code Cage Affilliates


To stop seeing these ads and get other benefits check This page!



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


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2
No part of this board may be copied or reproduced either in part or full without the express permission of The Code Cage Team.
We are not associated with nor employed by Microsoft in any way, we simply provide resources!
All MS office icons are registered trademarks of the application the represent