SlideShare une entreprise Scribd logo
1  sur  3
Télécharger pour lire hors ligne
E-TIPS
Finance, Valuation, Risk & Modelling
your one-partner solution for building skills and knowledge
Change Your Life with Excel
Adder Control
elcome to Change Your Life with Excel.
You’ll find this edition’s tip very useful if you’re
one of those who like to include a few paragraphs of text
in your worksheets. Excel wasn’t really designed for this
(that’s why Microsoft gave us Word) but sometimes
there’s no avoiding it, particularly if you’re, say, preparing
a report which is predominantly numbers, tables and
charts but which requires some narrative too.
This month’s trick uses an underused built-in function but
pushes it to do something it probably wasn’t designed for;
to sum only numbers which meet certain criteria.
As always, the features covered here are based on Excel
2003 however most can still be found in other versions.
Tip
Embedding Text in a Worksheet
Have you ever had to type a sentence or short paragraph
into Excel and got frustrated with having to manually
break lines? If so, this very quick and easy tip is for you.
It’s one of the quickest tips I’ve covered but requires a bit
of a cheat since we have to start off using Word.
• Open Word and type your required text. Use all
the formatting you need e.g. bullet points, fonts,
line spacing etc
• Highlight all the text and select Edit | Copy from
the Menu Bar
• Switch back to Excel and select the cell where
you want your text to be pasted
• Select Edit | PasteSpecial from the Menu Bar
• From the options available select Microsoft
Office Word Document Object
• Click OK
It looks like a simple text box has been pasted into your
worksheet but it’s much more than this. Notice that when
you double-click anywhere within the text you’ve just
pasted, your Excel Menu Bar and Toolbars become the
Word Menu Bar and Toolbars! What you’ve done is to
seamlessly embed a Word document inside your Excel
document which you can edit with all the functionality of
Word – you don’t even have to return to Word to make
any changes.
The huge advantage of using this technique is that all the
formatting you associate with Word is available to you
from within Excel (have you ever tried adding bullet
points in Excel?).
W
By Leigh Drake
Director
Arc Business Processes
www.arcbusiness.com.au
E-TIPS
Finance, Valuation, Risk & Modelling
your one-partner solution for building skills and knowledge
Note that by default a border appears around the edge of
the pasted text. To remove this:
• Right click once within the text and select
Format Object
• From the Format Object dialog box choose the
Colors and Lines tab
• Click the Line Color drop down arrow and select
No Line
• Click OK
Trick
Summing Numbers using Multiple Criteria
Many of you may be familiar with a built-in function called
SUMIF which allows you to add a range of values which
satisfy a single criterion e.g. add all the numbers in a list
which are greater than 100.
However, what if you need to add values based on more
than one criterion? For this we need to use a rather
under-utilised function called SUMPRODUCT. This
function is designed to take 2 or more ranges of values,
multiply them together and total the result. For example
in the illustration below SUMPRODUCT(A1:A4,B1:B4)
would calculate:
12x10 + 20x14 + 6x5 + 4x23 = 522
However, we’re going to take advantage of a quirk in
Excel which will allow us to use this function to sum
values based on multiple criteria.
Using the illustration below, suppose we want to add all
Laptop sales greater than 100 units. The 2 criteria here
are that:
1. Item = “Laptop”; and
2. Units > 100
I’ll tell you how to write the function and then explain how
it works.
Select the cell in which you require the answer and type:
=SUMPRODUCT((A2:A10="laptop")*(B2:B10>100),B2:B10)
The answer is 451, which you’ll see is correct if you look
at the data - there are 2 entries for laptops with sales
units greater than 100; 163 units and 288 units.
The first part of this function multiplies 2 expressions
together.
The first expression, (A2:A10="laptop"), looks at each
value in the range A2 to A10 and determines whether it
contains the value “laptop”. It returns a value of true or
false for each item i.e. false,true,false,false,true... (note
that the 2
nd
, 5
th
and 9
th
values are true because the value
“laptop” appears as the 2
nd
, 5
th
and 9
th
item).
Similarly the 2
nd
expression, (B2:B10>100), returns
false,false,true,false,true... (note that the 3
rd
, 5
th
and 9
th
values are true because the 3
rd
, 5
th
and 9
th
values in the
range B2 to B10 are greater than 100).
Finally B2:B10 just represents the range of values to sum
based on the above criteria.
So how does this all combine to give us our required
answer? This is where we take advantage of that Excel
quirk. We can write formulas and functions in Excel which
give answers of true or false but when we use these in
other formulas, a value of true is treated as a 1 and an
answer of false is treated as a 0. This is what happens
when we multiply (A2:A10="laptop") by (B2:B10>100). As
illustrated below this gives a series of 1’s and 0’s.
E-TIPS
Finance, Valuation, Risk & Modelling
your one-partner solution for building skills and knowledge
A2:A10="laptop" B2:B10>100
FALSE X FALSE = 0
TRUE X FALSE = 0
FALSE X TRUE = 0
FALSE X FALSE = 0
TRUE X TRUE = 1
FALSE X FALSE = 0
TRUE X FALSE = 0
FALSE X FALSE = 0
TRUE X TRUE = 1
The SUMPRODUCT function now works as normal by
taking all these 1’s and 0’s and multiplying them by the
range of values in the 2
nd
part of the function, B2:B10 i.e.
0x93 + 0x90 + 0x177 + 0x87 + 1x163 + 0x76 + 0x78 +
0x17 + 1x288
This gives the required answer of 451.
This example only uses 2 criteria but you can use almost
as many criteria as you need. To use 5 criteria for
example you would simply multiply your 5 expressions
together in the first part of the SUMPRODUCT function.
Look out for more great Excel tips and tricks next month.
Until then, happy Excelling!

Contenu connexe

En vedette

Estudio de investigacion Centro Walton de Neurología y Neurocirugía de Liverp...
Estudio de investigacion Centro Walton de Neurología y Neurocirugía de Liverp...Estudio de investigacion Centro Walton de Neurología y Neurocirugía de Liverp...
Estudio de investigacion Centro Walton de Neurología y Neurocirugía de Liverp...Ana Liébanas Serrano
 
Shared Services Leaders agenda March 2015 FINAL
Shared Services Leaders agenda March 2015 FINALShared Services Leaders agenda March 2015 FINAL
Shared Services Leaders agenda March 2015 FINALChantal Hevey
 
White Paper: Real-Time Monitoring of Passive Optical Networks
White Paper: Real-Time Monitoring of Passive Optical NetworksWhite Paper: Real-Time Monitoring of Passive Optical Networks
White Paper: Real-Time Monitoring of Passive Optical NetworksSusmita Adhikari Joshi
 
Tu Tienda Avon - www.axsum.com Tu Tienda AVON Logroño (La Rioja)
Tu Tienda Avon - www.axsum.com Tu Tienda AVON Logroño (La Rioja)Tu Tienda Avon - www.axsum.com Tu Tienda AVON Logroño (La Rioja)
Tu Tienda Avon - www.axsum.com Tu Tienda AVON Logroño (La Rioja)dani lee
 
Comercial del sur catalogo integral 2015
Comercial del sur catalogo integral 2015Comercial del sur catalogo integral 2015
Comercial del sur catalogo integral 2015ucasgon
 
Planejamento de Marketing, fundamentos básicos
Planejamento de Marketing, fundamentos básicosPlanejamento de Marketing, fundamentos básicos
Planejamento de Marketing, fundamentos básicosJuliano César
 
Modelo tecno-educativo SAMR: Fundamentos y aplicaciones
Modelo tecno-educativo SAMR: Fundamentos y aplicacionesModelo tecno-educativo SAMR: Fundamentos y aplicaciones
Modelo tecno-educativo SAMR: Fundamentos y aplicacionesLuis García-Utrera
 
Thomas Sterovsky - Polymun Scientific (Vienna Conference, April 2016)
Thomas Sterovsky - Polymun Scientific (Vienna Conference, April 2016)Thomas Sterovsky - Polymun Scientific (Vienna Conference, April 2016)
Thomas Sterovsky - Polymun Scientific (Vienna Conference, April 2016)IanTaylor50
 
Social Media. Estrategia corporativa
Social Media. Estrategia corporativaSocial Media. Estrategia corporativa
Social Media. Estrategia corporativaRoca Salvatella
 
Cidh. Informe Final Consulta Previa y Megaproyectos en Honduras
Cidh. Informe Final Consulta Previa y Megaproyectos en HondurasCidh. Informe Final Consulta Previa y Megaproyectos en Honduras
Cidh. Informe Final Consulta Previa y Megaproyectos en HondurasMovimiento Justicia
 
Exploración semiológica del aparato urinario de los animales domésticos
Exploración semiológica  del aparato urinario de los animales domésticosExploración semiológica  del aparato urinario de los animales domésticos
Exploración semiológica del aparato urinario de los animales domésticosEDUNORTE
 

En vedette (16)

Estudio de investigacion Centro Walton de Neurología y Neurocirugía de Liverp...
Estudio de investigacion Centro Walton de Neurología y Neurocirugía de Liverp...Estudio de investigacion Centro Walton de Neurología y Neurocirugía de Liverp...
Estudio de investigacion Centro Walton de Neurología y Neurocirugía de Liverp...
 
Shared Services Leaders agenda March 2015 FINAL
Shared Services Leaders agenda March 2015 FINALShared Services Leaders agenda March 2015 FINAL
Shared Services Leaders agenda March 2015 FINAL
 
2016 Expansion Email - Final
2016 Expansion Email - Final2016 Expansion Email - Final
2016 Expansion Email - Final
 
Johan trabajo de informatica
Johan trabajo de informaticaJohan trabajo de informatica
Johan trabajo de informatica
 
Corte fino
Corte finoCorte fino
Corte fino
 
White Paper: Real-Time Monitoring of Passive Optical Networks
White Paper: Real-Time Monitoring of Passive Optical NetworksWhite Paper: Real-Time Monitoring of Passive Optical Networks
White Paper: Real-Time Monitoring of Passive Optical Networks
 
Tu Tienda Avon - www.axsum.com Tu Tienda AVON Logroño (La Rioja)
Tu Tienda Avon - www.axsum.com Tu Tienda AVON Logroño (La Rioja)Tu Tienda Avon - www.axsum.com Tu Tienda AVON Logroño (La Rioja)
Tu Tienda Avon - www.axsum.com Tu Tienda AVON Logroño (La Rioja)
 
Área caribe 13
Área caribe 13Área caribe 13
Área caribe 13
 
Comercial del sur catalogo integral 2015
Comercial del sur catalogo integral 2015Comercial del sur catalogo integral 2015
Comercial del sur catalogo integral 2015
 
Planejamento de Marketing, fundamentos básicos
Planejamento de Marketing, fundamentos básicosPlanejamento de Marketing, fundamentos básicos
Planejamento de Marketing, fundamentos básicos
 
Modelo tecno-educativo SAMR: Fundamentos y aplicaciones
Modelo tecno-educativo SAMR: Fundamentos y aplicacionesModelo tecno-educativo SAMR: Fundamentos y aplicaciones
Modelo tecno-educativo SAMR: Fundamentos y aplicaciones
 
Edu a distancia art
Edu a distancia artEdu a distancia art
Edu a distancia art
 
Thomas Sterovsky - Polymun Scientific (Vienna Conference, April 2016)
Thomas Sterovsky - Polymun Scientific (Vienna Conference, April 2016)Thomas Sterovsky - Polymun Scientific (Vienna Conference, April 2016)
Thomas Sterovsky - Polymun Scientific (Vienna Conference, April 2016)
 
Social Media. Estrategia corporativa
Social Media. Estrategia corporativaSocial Media. Estrategia corporativa
Social Media. Estrategia corporativa
 
Cidh. Informe Final Consulta Previa y Megaproyectos en Honduras
Cidh. Informe Final Consulta Previa y Megaproyectos en HondurasCidh. Informe Final Consulta Previa y Megaproyectos en Honduras
Cidh. Informe Final Consulta Previa y Megaproyectos en Honduras
 
Exploración semiológica del aparato urinario de los animales domésticos
Exploración semiológica  del aparato urinario de los animales domésticosExploración semiológica  del aparato urinario de los animales domésticos
Exploración semiológica del aparato urinario de los animales domésticos
 

Dernier

How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17Celine George
 
UKCGE Parental Leave Discussion March 2024
UKCGE Parental Leave Discussion March 2024UKCGE Parental Leave Discussion March 2024
UKCGE Parental Leave Discussion March 2024UKCGE
 
AUDIENCE THEORY -- FANDOM -- JENKINS.pptx
AUDIENCE THEORY -- FANDOM -- JENKINS.pptxAUDIENCE THEORY -- FANDOM -- JENKINS.pptx
AUDIENCE THEORY -- FANDOM -- JENKINS.pptxiammrhaywood
 
5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...CaraSkikne1
 
General views of Histopathology and step
General views of Histopathology and stepGeneral views of Histopathology and step
General views of Histopathology and stepobaje godwin sunday
 
How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17Celine George
 
Practical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptxPractical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptxKatherine Villaluna
 
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptxSandy Millin
 
Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.raviapr7
 
Presentation on the Basics of Writing. Writing a Paragraph
Presentation on the Basics of Writing. Writing a ParagraphPresentation on the Basics of Writing. Writing a Paragraph
Presentation on the Basics of Writing. Writing a ParagraphNetziValdelomar1
 
Ultra structure and life cycle of Plasmodium.pptx
Ultra structure and life cycle of Plasmodium.pptxUltra structure and life cycle of Plasmodium.pptx
Ultra structure and life cycle of Plasmodium.pptxDr. Asif Anas
 
How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17Celine George
 
Patterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptxPatterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptxMYDA ANGELICA SUAN
 
How to Make a Field read-only in Odoo 17
How to Make a Field read-only in Odoo 17How to Make a Field read-only in Odoo 17
How to Make a Field read-only in Odoo 17Celine George
 
HED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdfHED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdfMohonDas
 
CapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptxCapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptxCapitolTechU
 
Human-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming ClassesHuman-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming ClassesMohammad Hassany
 
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfP4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfYu Kanazawa / Osaka University
 

Dernier (20)

How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17
 
UKCGE Parental Leave Discussion March 2024
UKCGE Parental Leave Discussion March 2024UKCGE Parental Leave Discussion March 2024
UKCGE Parental Leave Discussion March 2024
 
Prelims of Kant get Marx 2.0: a general politics quiz
Prelims of Kant get Marx 2.0: a general politics quizPrelims of Kant get Marx 2.0: a general politics quiz
Prelims of Kant get Marx 2.0: a general politics quiz
 
AUDIENCE THEORY -- FANDOM -- JENKINS.pptx
AUDIENCE THEORY -- FANDOM -- JENKINS.pptxAUDIENCE THEORY -- FANDOM -- JENKINS.pptx
AUDIENCE THEORY -- FANDOM -- JENKINS.pptx
 
5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...
 
General views of Histopathology and step
General views of Histopathology and stepGeneral views of Histopathology and step
General views of Histopathology and step
 
How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17
 
Practical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptxPractical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptx
 
Finals of Kant get Marx 2.0 : a general politics quiz
Finals of Kant get Marx 2.0 : a general politics quizFinals of Kant get Marx 2.0 : a general politics quiz
Finals of Kant get Marx 2.0 : a general politics quiz
 
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
 
Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.
 
Presentation on the Basics of Writing. Writing a Paragraph
Presentation on the Basics of Writing. Writing a ParagraphPresentation on the Basics of Writing. Writing a Paragraph
Presentation on the Basics of Writing. Writing a Paragraph
 
Ultra structure and life cycle of Plasmodium.pptx
Ultra structure and life cycle of Plasmodium.pptxUltra structure and life cycle of Plasmodium.pptx
Ultra structure and life cycle of Plasmodium.pptx
 
How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17
 
Patterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptxPatterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptx
 
How to Make a Field read-only in Odoo 17
How to Make a Field read-only in Odoo 17How to Make a Field read-only in Odoo 17
How to Make a Field read-only in Odoo 17
 
HED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdfHED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdf
 
CapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptxCapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptx
 
Human-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming ClassesHuman-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming Classes
 
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfP4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
 

Excel Tip: Adder Control

  • 1. E-TIPS Finance, Valuation, Risk & Modelling your one-partner solution for building skills and knowledge Change Your Life with Excel Adder Control elcome to Change Your Life with Excel. You’ll find this edition’s tip very useful if you’re one of those who like to include a few paragraphs of text in your worksheets. Excel wasn’t really designed for this (that’s why Microsoft gave us Word) but sometimes there’s no avoiding it, particularly if you’re, say, preparing a report which is predominantly numbers, tables and charts but which requires some narrative too. This month’s trick uses an underused built-in function but pushes it to do something it probably wasn’t designed for; to sum only numbers which meet certain criteria. As always, the features covered here are based on Excel 2003 however most can still be found in other versions. Tip Embedding Text in a Worksheet Have you ever had to type a sentence or short paragraph into Excel and got frustrated with having to manually break lines? If so, this very quick and easy tip is for you. It’s one of the quickest tips I’ve covered but requires a bit of a cheat since we have to start off using Word. • Open Word and type your required text. Use all the formatting you need e.g. bullet points, fonts, line spacing etc • Highlight all the text and select Edit | Copy from the Menu Bar • Switch back to Excel and select the cell where you want your text to be pasted • Select Edit | PasteSpecial from the Menu Bar • From the options available select Microsoft Office Word Document Object • Click OK It looks like a simple text box has been pasted into your worksheet but it’s much more than this. Notice that when you double-click anywhere within the text you’ve just pasted, your Excel Menu Bar and Toolbars become the Word Menu Bar and Toolbars! What you’ve done is to seamlessly embed a Word document inside your Excel document which you can edit with all the functionality of Word – you don’t even have to return to Word to make any changes. The huge advantage of using this technique is that all the formatting you associate with Word is available to you from within Excel (have you ever tried adding bullet points in Excel?). W By Leigh Drake Director Arc Business Processes www.arcbusiness.com.au
  • 2. E-TIPS Finance, Valuation, Risk & Modelling your one-partner solution for building skills and knowledge Note that by default a border appears around the edge of the pasted text. To remove this: • Right click once within the text and select Format Object • From the Format Object dialog box choose the Colors and Lines tab • Click the Line Color drop down arrow and select No Line • Click OK Trick Summing Numbers using Multiple Criteria Many of you may be familiar with a built-in function called SUMIF which allows you to add a range of values which satisfy a single criterion e.g. add all the numbers in a list which are greater than 100. However, what if you need to add values based on more than one criterion? For this we need to use a rather under-utilised function called SUMPRODUCT. This function is designed to take 2 or more ranges of values, multiply them together and total the result. For example in the illustration below SUMPRODUCT(A1:A4,B1:B4) would calculate: 12x10 + 20x14 + 6x5 + 4x23 = 522 However, we’re going to take advantage of a quirk in Excel which will allow us to use this function to sum values based on multiple criteria. Using the illustration below, suppose we want to add all Laptop sales greater than 100 units. The 2 criteria here are that: 1. Item = “Laptop”; and 2. Units > 100 I’ll tell you how to write the function and then explain how it works. Select the cell in which you require the answer and type: =SUMPRODUCT((A2:A10="laptop")*(B2:B10>100),B2:B10) The answer is 451, which you’ll see is correct if you look at the data - there are 2 entries for laptops with sales units greater than 100; 163 units and 288 units. The first part of this function multiplies 2 expressions together. The first expression, (A2:A10="laptop"), looks at each value in the range A2 to A10 and determines whether it contains the value “laptop”. It returns a value of true or false for each item i.e. false,true,false,false,true... (note that the 2 nd , 5 th and 9 th values are true because the value “laptop” appears as the 2 nd , 5 th and 9 th item). Similarly the 2 nd expression, (B2:B10>100), returns false,false,true,false,true... (note that the 3 rd , 5 th and 9 th values are true because the 3 rd , 5 th and 9 th values in the range B2 to B10 are greater than 100). Finally B2:B10 just represents the range of values to sum based on the above criteria. So how does this all combine to give us our required answer? This is where we take advantage of that Excel quirk. We can write formulas and functions in Excel which give answers of true or false but when we use these in other formulas, a value of true is treated as a 1 and an answer of false is treated as a 0. This is what happens when we multiply (A2:A10="laptop") by (B2:B10>100). As illustrated below this gives a series of 1’s and 0’s.
  • 3. E-TIPS Finance, Valuation, Risk & Modelling your one-partner solution for building skills and knowledge A2:A10="laptop" B2:B10>100 FALSE X FALSE = 0 TRUE X FALSE = 0 FALSE X TRUE = 0 FALSE X FALSE = 0 TRUE X TRUE = 1 FALSE X FALSE = 0 TRUE X FALSE = 0 FALSE X FALSE = 0 TRUE X TRUE = 1 The SUMPRODUCT function now works as normal by taking all these 1’s and 0’s and multiplying them by the range of values in the 2 nd part of the function, B2:B10 i.e. 0x93 + 0x90 + 0x177 + 0x87 + 1x163 + 0x76 + 0x78 + 0x17 + 1x288 This gives the required answer of 451. This example only uses 2 criteria but you can use almost as many criteria as you need. To use 5 criteria for example you would simply multiply your 5 expressions together in the first part of the SUMPRODUCT function. Look out for more great Excel tips and tricks next month. Until then, happy Excelling!