• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

IF AND Function for 4 outcomes|General Excel Questions & Answers|Excel Forum|My Online Training Hub

You are here: Home / IF AND Function for 4 outcomes|General Excel Questions & Answers|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumGeneral Excel Questions & Answe…IF AND Function for 4 outcomes
sp_PrintTopic sp_TopicIcon
IF AND Function for 4 outcomes
Avatar
robert alvarez
Member
Members
Level 0
Forum Posts: 16
Member Since:
May 11, 2019
sp_UserOfflineSmall Offline
1
August 17, 2019 - 7:40 am
sp_Permalink sp_Print

Hi!

I am trying to get an solution out of 4 possible outcomes to make a calculator.  I tried a few IF(And functions, but Im not sure if this is the best way to attack this.

 

So as per the table below, 

if its a Yes on EI Docs, and its a Yes in UA, then the Fee will be 25

if its a No on EI Docs, and its a No in UA, then the Fee will be 25

etc..

EI DOCS UA Fee
Yes Yes 25
No No 45
No Yes 26
No No 46.8
sp_AnswersTopicSeeAnswer See Answer
Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1518
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
2
August 18, 2019 - 1:13 pm
sp_Permalink sp_Print

Hi Robert,

The 2nd and 4th conditions are No in both El Docs and UA, so how do we distinguish the difference between them to know that one has a fee of 45 and the other has a fee of 46.8?

Also you write that 'if its a No on EI Docs, and its a No in UA, then the Fee will be 25' but the table has a different fee.

Regards

Phil 

Avatar
robert alvarez
Member
Members
Level 0
Forum Posts: 16
Member Since:
May 11, 2019
sp_UserOfflineSmall Offline
3
August 20, 2019 - 1:04 am
sp_Permalink sp_Print

Hi Phillip,

 

Thanks for the reply.  Youre right, I had a typo, the table should be as below:

 

EI DOCS UA Fee
Yes Yes 25
Yes No 45
No Yes 26
No No 46.8
Avatar
Anders Sehlstedt
Eskilstuna, Sweden

VIP
Members


Trusted Members
Level 3
Forum Posts: 871
Member Since:
December 7, 2016
sp_UserOfflineSmall Offline
4
August 20, 2019 - 6:57 am
sp_Permalink sp_Print sp_EditHistory

Hello,

Based on the provided example I would use DGET for this. You need to change the layout of your ”input form” to get it to work.

Example: In cells B7 and C7 I have the same headers as in your lookup ”table” (cells G17 to I21, ie El DOCS and UA. In cells B8 and C8 we have the ”Yes” and ”No” dropdown lists and in cell D10 we have the below formula.

=DGET(G17:I21,3,B7:C8)

If you intend to add more to this ”form” then perhaps the DGET function is not the most optimal.

sp_AnswersTopicAnswer
Answers Post
Avatar
Greg Beck
Member
Members
Level 0
Forum Posts: 9
Member Since:
July 5, 2019
sp_UserOfflineSmall Offline
5
August 20, 2019 - 1:06 pm
sp_Permalink sp_Print

Another option is to add a "helper" column to your table, using formula:

=G24&H24

(and copy this formula down the table)

And then use this formula to get the answer (this assumes the formula above you put in range F24:F27):

=INDEX(I24:I27,MATCH(D7&D9,F24:F27,0))

Avatar
robert alvarez
Member
Members
Level 0
Forum Posts: 16
Member Since:
May 11, 2019
sp_UserOfflineSmall Offline
6
August 21, 2019 - 2:58 am
sp_Permalink sp_Print sp_EditHistory

Thanks Anders,

 

This worked just fine.

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Sonja Mason, Alexandra Radu, Denise Lloyd
Guest(s) 10
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 871
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Raj Mattoo
Mark Luke
terimeri dooriyan
Jack Aston
AndyC
Denise Lloyd
michael serna
mashal sana
Tiffany Kang
Leah Gillmore
Forum Stats:
Groups: 3
Forums: 24
Topics: 6219
Posts: 27276

 

Member Stats:
Guest Posters: 49
Members: 31903
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.