• 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 one cell have any text than answer as 2000|General Excel Questions & Answers|Excel Forum|My Online Training Hub

You are here: Home / If one cell have any text than answer as 2000|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 one cell have any text than answ…
sp_PrintTopic sp_TopicIcon
If one cell have any text than answer as 2000
Avatar
Waqas Munir
Member
Members
Level 0
Forum Posts: 20
Member Since:
September 18, 2019
sp_UserOfflineSmall Offline
1
September 18, 2019 - 6:46 pm
sp_Permalink sp_Print

Hello,

1.    I need a formula for D column if A1 have any text and B1 and C1 is empty the D1 Should Should get 2000

2.    If A1 and B1 have any text then D1 should get 4000

3.    If A1, B1 and C1 have any text then D1 should get 6000

4.     If A1 have specific text that is 2 stops then D1 should get 1000.

 

Note:  =IF(E78<>"",IF(F78<>"",4000,2000),"")

I m using this formula for first two conditions and it is working correctly but i want to add condition # 3 & 4 in the same formula please guide me what to do??? 

A B C D
Any Text - - 2000
Any Text Any Text - 4000
Any Text Any Text Any Text 6000
2 Stops - - 1000

Waiting for respond on this and file of excel is also attached.

Regards

Waqas Munir

sp_AnswersTopicSeeAnswer See Answer
Avatar
Carine Hough

New Member
Members

Power Pivot
Level 0
Forum Posts: 2
Member Since:
May 26, 2016
sp_UserOfflineSmall Offline
2
September 18, 2019 - 8:56 pm
sp_Permalink sp_Print

Hello Waqas Munir

I have used the following formula to solve your problem:

=IF(A2="2 Stops", 1000, IF(C2<>"", 6000, IF(B2<>"", 4000, 2000)))

Instead of approaching your logical reasoning from top to bottom, I have evaluated the easiest argument first (If the value in column A2 = “2 Stops”, then return 1000, irrespective of the value of the cells in any other columns.)

Then I evaluated the rest of your process back to front. First check if value in column C is empty. If not, return 6000 (irrespective of values in other cells).

If value in column C is not empty, check if value in column B is empty, if not, return 4000, and if it is empty, it falls back to the last possibility: That only the value in column A contains text, in which case 2000 should be returned.

This solution assumes that there won’t be a value in one column if there isn’t a value in the column just before it. For example, it assumes that Column C will not be populated if Column A and B isn’t also populated with some text. If this is NOT the case, this formula might not work as intended, then you would need another solution / formula which may be longer / a bit more complicated.

Hope this helps.

Avatar
Waqas Munir
Member
Members
Level 0
Forum Posts: 20
Member Since:
September 18, 2019
sp_UserOfflineSmall Offline
3
September 18, 2019 - 9:10 pm
sp_Permalink sp_Print

Hello Carine Hough,

Formula is working for all conditions but....with this formula answer remains 2000 if A1 B1 C1 is empty whereas answer in D1 also should empty if all of the three are empty. Here is your suggested file is attached please see it. Just clear this error rest is ok and i am waiting for your respond.

Thanks in advance Carine.

Avatar
Carine Hough

New Member
Members

Power Pivot
Level 0
Forum Posts: 2
Member Since:
May 26, 2016
sp_UserOfflineSmall Offline
4
September 18, 2019 - 9:58 pm
sp_Permalink sp_Print

Hi Waqas

No problem, I have wrapped the formula in another IF function to deal with this condition too.

=IF(A2="", "", IF(A2="2 Stops", 1000, IF(C2<>"", 6000, IF(B2<>"", 4000, 2000))))

See attached file again - it now deals with all 5 conditions.

sp_AnswersTopicAnswer
Answers Post
Avatar
Waqas Munir
Member
Members
Level 0
Forum Posts: 20
Member Since:
September 18, 2019
sp_UserOfflineSmall Offline
5
September 19, 2019 - 5:04 am
sp_Permalink sp_Print

Hello Carine Hough,

Wow! 

That great...Thank you so much. This formula meets my all five conditions. Thanks Again

Regards

Waqas Munir

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Philip Treacy, Ahmad Alkhuffash, Chandler Davis, Ramon Lagos
Guest(s) 7
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
michael serna
mashal sana
Tiffany Kang
Leah Gillmore
Sopi Yuniarti
LAFONSO HERNANDEZ
Hayden Hao
Angela chen
Sean Moore
John Chisholm
Forum Stats:
Groups: 3
Forums: 24
Topics: 6215
Posts: 27245

 

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