SlideShare a Scribd company logo
Nested Functions

How do we evaluate a complex
formula?
What are DeMorgan’s Laws?

CS 105 Spring 2011

#1
Grade Example
• Suppose there is
2% extra credit
(column AK)
• Solution 1: create
column AN for
“Points + EC”

Y

Y

=IF(AK2=“Y”,AI2*102%,AI2)

Then use
• Solution 2:

=VLOOKUP(AN2,AL2:AM12,TRUE)

Y

=VLOOKUP( IF(AK2=“Y”,AI2*102%,AI2) ,AL2:AM12,TRUE)

CS 105 Spring 2011

#2
Nested Functions
• In order to evaluate a complex formula like
=VLOOKUP(IF(AK2=“Y”,AI2*102%,AI2),AL2:AM12,TRUE)

start by evaluating the inner parts
• The overall formula can be evaluated once the
values of the inner sub-expressions are known

• A more complex example:
IF(ISERROR(VLOOKUP(value,range,col)),”No”,”Yes”)
3

2

1

CS 105 Spring 2011

#3
DeMorgan’s Laws
• Consider the following formulas:
a) NOT(AND(X, Y))
b) AND(NOT(X), NOT(Y))
c) NOT(OR(X, Y))
d) OR(NOT(X), NOT(Y))
• The formulas (a) and (d) are equivalent, and so are
formulas (b) and (c)
• We can verify this with truth tables:
X

Y

AND(X,Y)

NOT(AND(X,Y))

NOT(X)

NOT(Y)

OR(NOT(X), NOT(Y))

0

0

0

1

1

1

1

0

1

0

1

1

0

1

1

0

0

1

0

1

1

1

1

1

0

0

0

0

CS 105 Spring 2011

#4
Example: College Admissions
• A college grants admissions based on three criteria:
SAT score (S), Letter score (L), and References (R)
S

L

R

Decision

1300

AND

8.5

AND

8.25

Strong accept

1200

AND

8.0

AND

7.80

Accept

1200

OR

7.5

OR

7.00

Reject

…

Manual

…

ELSE

• Which of these formulas is correct?
IF(AND(S>=1300,L>=8.5,R>=8.25),
"Strong accept",
IF(AND(S>=1200, L>=8, R>=7.8),
"Accept",
IF(OR(S<1200, L<7.5, R<7),
"Reject", "Manual")))

IF(OR(S<1200,L<7.5,R<7),
"Reject",
IF(OR(L<8,R<7.8),"Manual",
IF(OR(S<1300,L<8.5,R<8.25),
"Accept",
"Strong accept")))

CS 105 Spring 2011

#5
Testing Your Knowledge

• How do we evaluate a complex
formula?
• What are DeMorgan’s Laws?

CS 105 Spring 2011

#6

More Related Content

PPTX
03 excel1
 
PPTX
Research Peptides Website Reviews & Where to Buy Peptides
PPTX
Primeros pasos de power point
PDF
Digital Gravity
TXT
Arial9
PPT
English whale
PPTX
Cрби у Pумунији
PDF
Math120 20122
03 excel1
 
Research Peptides Website Reviews & Where to Buy Peptides
Primeros pasos de power point
Digital Gravity
Arial9
English whale
Cрби у Pумунији
Math120 20122

Viewers also liked (10)

PPTX
Serbian football in 1930
PPTX
01
 
PPTX
PPTX
Forecasting the future
PPTX
excel ppt
 
PPTX
PPTX
IMAGING OF INTRACRANIAL PRIMARY NON-NEOPLASTIC CYSTS
PPTX
Testicular Torsion
PPTX
CYSTIC FIBROSIS
PPTX
Applicationofstack by Ali F.RAshid
Serbian football in 1930
01
 
Forecasting the future
excel ppt
 
IMAGING OF INTRACRANIAL PRIMARY NON-NEOPLASTIC CYSTS
Testicular Torsion
CYSTIC FIBROSIS
Applicationofstack by Ali F.RAshid
Ad

Similar to 06 excel4 (19)

PPT
Excel 2003 formulas
PPT
EXCEL ON POWER POINT.ppt fresh student learning
DOCX
Excel formulas
PPT
Excel IF, IFs.ppt
PDF
Excel.fns frmls
PDF
Iipm chapter 1
PDF
Iipm chapter 1
PPTX
advance spreadsheet skils LESSON 4 - PPT.pptx
DOCX
Excel
DOCX
Excel
PPT
Excel CH 02 Working with Formulas Functions.ppt
PDF
03 Logical functions.pdf
PPTX
If and nested i fs
PPT
042-MIS105-L07.ppt
PPTX
10 Excel Formulas that will help you in any Job
DOCX
management
PDF
EXCEL FUNCTIONS and Advanced Formula Combinations Excel Mastery Series Unleas...
PDF
EXCEL FUNCTIONS and Advanced Formula Combinations Excel Mastery Series Unleas...
PDF
Dbms quiz 01 solution
Excel 2003 formulas
EXCEL ON POWER POINT.ppt fresh student learning
Excel formulas
Excel IF, IFs.ppt
Excel.fns frmls
Iipm chapter 1
Iipm chapter 1
advance spreadsheet skils LESSON 4 - PPT.pptx
Excel
Excel
Excel CH 02 Working with Formulas Functions.ppt
03 Logical functions.pdf
If and nested i fs
042-MIS105-L07.ppt
10 Excel Formulas that will help you in any Job
management
EXCEL FUNCTIONS and Advanced Formula Combinations Excel Mastery Series Unleas...
EXCEL FUNCTIONS and Advanced Formula Combinations Excel Mastery Series Unleas...
Dbms quiz 01 solution
Ad

Recently uploaded (20)

PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Complications of Minimal Access Surgery at WLH
PDF
Yogi Goddess Pres Conference Studio Updates
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
Cell Structure & Organelles in detailed.
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
What if we spent less time fighting change, and more time building what’s rig...
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PPTX
UNIT III MENTAL HEALTH NURSING ASSESSMENT
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
Trump Administration's workforce development strategy
PDF
Paper A Mock Exam 9_ Attempt review.pdf.
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
PDF
01-Introduction-to-Information-Management.pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Microbial diseases, their pathogenesis and prophylaxis
2.FourierTransform-ShortQuestionswithAnswers.pdf
Final Presentation General Medicine 03-08-2024.pptx
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Complications of Minimal Access Surgery at WLH
Yogi Goddess Pres Conference Studio Updates
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Cell Structure & Organelles in detailed.
A systematic review of self-coping strategies used by university students to ...
What if we spent less time fighting change, and more time building what’s rig...
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
UNIT III MENTAL HEALTH NURSING ASSESSMENT
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Trump Administration's workforce development strategy
Paper A Mock Exam 9_ Attempt review.pdf.
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
LDMMIA Reiki Yoga Finals Review Spring Summer
01-Introduction-to-Information-Management.pdf
Supply Chain Operations Speaking Notes -ICLT Program

06 excel4

  • 1. Nested Functions How do we evaluate a complex formula? What are DeMorgan’s Laws? CS 105 Spring 2011 #1
  • 2. Grade Example • Suppose there is 2% extra credit (column AK) • Solution 1: create column AN for “Points + EC” Y Y =IF(AK2=“Y”,AI2*102%,AI2) Then use • Solution 2: =VLOOKUP(AN2,AL2:AM12,TRUE) Y =VLOOKUP( IF(AK2=“Y”,AI2*102%,AI2) ,AL2:AM12,TRUE) CS 105 Spring 2011 #2
  • 3. Nested Functions • In order to evaluate a complex formula like =VLOOKUP(IF(AK2=“Y”,AI2*102%,AI2),AL2:AM12,TRUE) start by evaluating the inner parts • The overall formula can be evaluated once the values of the inner sub-expressions are known • A more complex example: IF(ISERROR(VLOOKUP(value,range,col)),”No”,”Yes”) 3 2 1 CS 105 Spring 2011 #3
  • 4. DeMorgan’s Laws • Consider the following formulas: a) NOT(AND(X, Y)) b) AND(NOT(X), NOT(Y)) c) NOT(OR(X, Y)) d) OR(NOT(X), NOT(Y)) • The formulas (a) and (d) are equivalent, and so are formulas (b) and (c) • We can verify this with truth tables: X Y AND(X,Y) NOT(AND(X,Y)) NOT(X) NOT(Y) OR(NOT(X), NOT(Y)) 0 0 0 1 1 1 1 0 1 0 1 1 0 1 1 0 0 1 0 1 1 1 1 1 0 0 0 0 CS 105 Spring 2011 #4
  • 5. Example: College Admissions • A college grants admissions based on three criteria: SAT score (S), Letter score (L), and References (R) S L R Decision 1300 AND 8.5 AND 8.25 Strong accept 1200 AND 8.0 AND 7.80 Accept 1200 OR 7.5 OR 7.00 Reject … Manual … ELSE • Which of these formulas is correct? IF(AND(S>=1300,L>=8.5,R>=8.25), "Strong accept", IF(AND(S>=1200, L>=8, R>=7.8), "Accept", IF(OR(S<1200, L<7.5, R<7), "Reject", "Manual"))) IF(OR(S<1200,L<7.5,R<7), "Reject", IF(OR(L<8,R<7.8),"Manual", IF(OR(S<1300,L<8.5,R<8.25), "Accept", "Strong accept"))) CS 105 Spring 2011 #5
  • 6. Testing Your Knowledge • How do we evaluate a complex formula? • What are DeMorgan’s Laws? CS 105 Spring 2011 #6