excel vba training - formulas based formats
Microsoft Office Training verified by visa - mastercard securecode about microsoft training company london ukadd this page to your favourites/bookmarksAdd to favourites
view a printable version of this pagePrintable version
email this page to somebodyEmail this page
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel Training and help » excel vba training - Formulas based on formats

excel vba training - Formulas based on formats

The UK's most regular instructor-led training courses.
Training information: excel vba training · Excel courses · Microsoft Excel Training London
See also · excel-courses-london · excel courses in london · excel microsoft training

resolvedResolved · Low Priority · Version Standard

Formulas based on formats

Jennifer has attended:
Excel Advanced course

by - delegate Jennifer [1 post] (2007 Sep 12 Wed, 15:29) replyReply

Is is possible to relate a sum formula for cell format (i.e. sum all cells in x column where colour is red)

Excel Intermediate 1 day course
Version Date Location Places
available
Book Next place rate:
Card Invoice
2003 2008 Dec 2 Tue Bloomsbury 0 FULL    
2003 2008 Dec 4 Thu Bayswater 3 book now £195 £205
2007 2008 Dec 8 Mon Bayswater 3 book now £224 £224
2007 2008 Dec 9 Tue Bloomsbury 0 FULL    
2002/XP 2008 Dec 9 Tue Tooting 0 FULL    
2003 2008 Dec 11 Thu Southwark 7 book now £188 £215
Full Schedule: See all 110 Excel Intermediate course dates.
Bookings currently available until 25th November 2009.

RE: formulas based on formats

by - trainer Anthony gold contributer[113 posts] (2007 Sep 25 Tue, 16:17) replyReply

Hi Jennifer. I'd approach this in two different ways. The first depends whether you are using conditional formatting to alter the format of a cell. If so, you could appropriate the criteria from that cell (say, if A12>100), cycle through all the cells in the worksheet and then perform the calculation.

Alternatively, I'd use a piece of VBA and an IF...Then...Else loop to pick out the formatting of each cell, see whether it is coloured red, add the value to an array if it is and then add those values and paste the result into the cell of my choice.

So it is possible!

Hope this helps.

Anthony

RE: formulas based on formats

by - trainer Katie gold contributer[214 posts] (2007 Sep 25 Tue, 16:21) replyReply

Hi Jennifer,

The function SUMIF comes with a critieria. So you can simply put the existing condition for the cells being RED (I'm assuming you placed a "conditional formatting" condition to make cells red) onto SUMIF.

1) Select result cell
2) Insert function: SUMIF
=SUMIF(cell range of criteria, condition, sum range)
3) Press Enter

e.g. sum all sales over 50
Cell A1: 60
Cell B1: 30
Cell C1: 80
=SUMIF(A1:C1; ">50", A1:C1)

result: 140


Hope this helps.

Katie


Related articles

· Basic Excel Training
· Reasons Why VBA for Excel Training Fails
· Advanced level training: Microsoft Excel and the Web
· An Introduction to Microsoft Excel: Top Features for the Excel Novice
· What's Better Than the Help Function in Excel? Microsoft Training

Excel tip:

New Normal Worksheet

Do you want all your worksheets to confirm to a certain look? Then change the Defaults!!!
1. Press Shift+F11 to create a new worksheet
2. Press Ctrl+A to select (higlight) all cells, Press Ctrl+1, make any formatting changes then click OK.
3. Press F12 (Function 12 key) click in the Save As Type, drop down, then select Template (*.xlt)
4. Click in the Save in drop-down, then find the folder; c:_program files_microsoft office_office_start. (For the underscores shown use backslash)
Name your templete sheet.xlt, then press Enter.
Sheet.xlt is used when you insert a new worksheet (Shift+F11)

Note: These changes are permanent changes on your PC.

View all Excel hints and tips

Rate this page:
4.0/5 (3 votes cast)
Institute of IT Training - Accredited Training Provider Microsoft Certified Partner
microsoft office
Microsoft Office Specialist Authorised Testing Centre (MOS and MCAS)

Prodigy Platinum Learning Partner

Institute of IT Training - Accredited Training Provider Association of Computer Trainers Valid HTML 4.01 Transitional
Valid CSS Markup

secure online payments - visa - mastercard

Mini sitemap. These are the main areas of our web site. Full sitemap.

Training by application Main information pages See also

Access courses
DreamWeaver courses
Excel courses
MS Project courses
Outlook courses
PowerPoint courses
VBA courses
Word courses
(more...)

Public scheduled courses
On-site training
Closed company courses

Microsoft Office training
Pricing and availability
Training schedule
Training venues

Access training
Dreamweaver training
Excel training
MS Project training
PowerPoint training

London Computer Training
Computer Training London

Microsoft Access training
Microsoft Excel training
Microsoft Project training
Microsoft Outlook training
Microsoft Powerpoint training
Microsoft Word training

Time Management Course London

Interested in Access training? Please see the following pages:
microsoft access courses · microsoft training access course
microsoft+access+training · access courses in london

Training Information

Training Articles

AddThis Social Bookmark Button What's this?
Add to Del.icio.us Add to Facebook Add to Digg Add to Reddit Add to Google Add to Yahoo Add to Diigo Add to Mr. Wong Add to Linkarena Add to Power Oldie Add to Folkd Add to Jumptags Add to Upchuckr Add to Simpy Add to StumbleUpon Add to Slashdot Add to Netscape Add to Furl Add to Spurl Add to Blinklist Add to Blogmarks Add to Technorati Add to Newsvine Add to Blinkbits Add to Ma.Gnolia Add to Smarking Add to Netvouz