• 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
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

IF nested function|General Excel Questions & Answers|Excel Forum|My Online Training Hub

You are here: Home / IF nested function|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 nested function
sp_PrintTopic sp_TopicIcon
IF nested function
Avatar
Wonder Woman
Member
Members
Level 0
Forum Posts: 30
Member Since:
December 7, 2020
sp_UserOfflineSmall Offline
1
October 27, 2021 - 4:13 pm
sp_Permalink sp_Print

HI

I have the below nested IF, OR and AND function, it works except for the last one L6, if C6 = "Datasheet" then I want it to show the value in L6, which it is not doing.

where am I going wrong please???? 

 

=IF(P6>0,(IF(((OR(C6="Drawing",C6="Document"))),CONCAT(A6,"_","r",Q6,R6),

IF((AND(C6="Datasheet", P6<0)),   L6," ")))," ")

 

thanks

sp_AnswersTopicSeeAnswer See Answer
Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4515
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
2
October 28, 2021 - 9:59 am
sp_Permalink sp_Print sp_EditHistory

Hi Tania,

The formula has too many parentheses, but that won't be causing the problem. Here's the same formula without the extra parentheses:

=IF(P6>0,
IF(OR(C6="Drawing",C6="Document"),CONCAT(A6,"_","r",Q6,R6),
IF(AND(C6="Datasheet", P6<0), L6," "))," ")

 

If it's not returning L6 then C6 either doesn't contain the text, Datasheet, or P6 is not greater than zero.

Hard to say more without seeing the file or a sample file.

Mynda

Avatar
Wonder Woman
Member
Members
Level 0
Forum Posts: 30
Member Since:
December 7, 2020
sp_UserOfflineSmall Offline
3
November 2, 2021 - 10:44 am
sp_Permalink sp_Print

Hi Mynda

yes I thought that too... that P6 is not empty, even though it appears to be empty.
see attached sample file.

on sheet "CPB Doc Request" in column C on the yellow rows is where I am testing this formula. row 6 to be exact.

so in the drop down of C6, if it = "Documents" or "Drawings" then I need it to return the CONCAT(A6,"_","r",Q6,R6) but only if there is data in P6. perhaps P6>0 is not the correct formula to use here?

but... if C6 = "Datasheets" I want it to return the value in L6, AND I need to make sure there is NO data value in P6, but if there is accidently data in P6, then it could return a false "Please remove data in column P" or something along those lines.

Hope that makes sense.

Tania

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4515
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
4
November 2, 2021 - 10:53 am
sp_Permalink sp_Print

Hi Tania,

In the file you shared cell P6 is empty, and the first logical test of the formula is to test if P6>0. In your file P6 is not greater than zero, therefore it skips to the 'value if false' argument, which is " " and returns a space. 

If you enter a value in P6 the formula evaluates as you wish.

Mynda

Avatar
Wonder Woman
Member
Members
Level 0
Forum Posts: 30
Member Since:
December 7, 2020
sp_UserOfflineSmall Offline
5
November 3, 2021 - 3:21 pm
sp_Permalink sp_Print

ahh ok thanks

but there needs to be no value in P6 for this one. 

how do I write the formula. for the following.

If C6 = Drawing or Document with a value in P6, then it returns the concate formula

But if C6 = Datasheet, with no Value in in P6 then it just needs to return L6. 

sorry but I am a bit stumped onto how to write the correct formula for this.

Kind Regards

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4515
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
6
November 3, 2021 - 7:32 pm
sp_Permalink sp_Print

Hi Tania,

Try this:

=IF(AND(C6="Datasheet",P6=""),L6,IF(P6<>"",IF(OR(C6="Drawing",C6="Document"),CONCAT(A6,"_","r",Q6,R6),""),""))

 

Mynda

sp_AnswersTopicAnswer
Answers Post
Avatar
Wonder Woman
Member
Members
Level 0
Forum Posts: 30
Member Since:
December 7, 2020
sp_UserOfflineSmall Offline
7
November 4, 2021 - 2:08 pm
sp_Permalink sp_Print

thanks Mynda, this worked perfectly

 

thanks so much for your help.

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Kathleen Silva
Guest(s) 9
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 873
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 222
Jessica Stewart: 215
A.Maurizio: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Anthony van Riessen
Erlinda Eloriaga
Abisola Ogundele
MARTYN STERRY
Rahim Lakhani
Ngoc Qui Nguyen
Clement Mansfield
Rose .
Bindu Menon
Baruch Zemer
Forum Stats:
Groups: 3
Forums: 24
Topics: 6352
Posts: 27779

 

Member Stats:
Guest Posters: 49
Members: 32319
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.