Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-21-2024, 02:01 PM
Ren1975 Ren1975 is offline Multiple IF statement issue Windows 10 Multiple IF statement issue Office 2010
Novice
Multiple IF statement issue
 
Join Date: Mar 2024
Posts: 5
Ren1975 is on a distinguished road
Lightbulb Multiple IF statement issue

Good morning,

I am wondering if someone can help me solve how to format an IF statement for multiple conditions? I am usually ok with this, but I am going around in circles with this one.
This is what I am trying to achieve -

IF (DAName1) has data, but (DAName2) doesn't, I need it to return "(DAName1) has been added to your policy as a delegated authority and can now access your information and make claims on your behalf"

IF (DAName1) and (DAName2) both contain data, I need it to return "(DAName1) and (DAName2) have been added to your policy as delegated authorities and they now have access to your information and can make claims on your behalf"

IF (DAName1) and (DAName2) are both blank, I need it to return nothing.

Any assistance would be greatly appreciated.
Reply With Quote
  #2  
Old 03-21-2024, 02:55 PM
Guessed's Avatar
Guessed Guessed is offline Multiple IF statement issue Windows 10 Multiple IF statement issue Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Is this for a macro or a field?
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #3  
Old 03-21-2024, 02:57 PM
Ren1975 Ren1975 is offline Multiple IF statement issue Windows 10 Multiple IF statement issue Office 2010
Novice
Multiple IF statement issue
 
Join Date: Mar 2024
Posts: 5
Ren1975 is on a distinguished road
Default

Hi it is for a field
Reply With Quote
  #4  
Old 03-21-2024, 03:09 PM
Ren1975 Ren1975 is offline Multiple IF statement issue Windows 10 Multiple IF statement issue Office 2010
Novice
Multiple IF statement issue
 
Join Date: Mar 2024
Posts: 5
Ren1975 is on a distinguished road
Default

Thanks for your help but I have now figured this out
Reply With Quote
  #5  
Old 03-21-2024, 03:20 PM
Guessed's Avatar
Guessed Guessed is offline Multiple IF statement issue Windows 10 Multiple IF statement issue Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

The basic structure is
{If DAName1 {If DAName2 "Result for both DAName1 and DAName2" "Result for only DAName1"} ""}
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #6  
Old 03-21-2024, 03:51 PM
Ren1975 Ren1975 is offline Multiple IF statement issue Windows 10 Multiple IF statement issue Office 2010
Novice
Multiple IF statement issue
 
Join Date: Mar 2024
Posts: 5
Ren1975 is on a distinguished road
Default

Thank you
Reply With Quote
  #7  
Old 03-25-2024, 01:41 PM
TessaMurillo TessaMurillo is offline Multiple IF statement issue Windows Vista Multiple IF statement issue Office 2010
Advanced Beginner
 
Join Date: Mar 2024
Posts: 33
TessaMurillo has a little shameless behaviour in the past
Default

To achieve your goal you need to use the IF function in Excel with multiple conditions
=IF(AND(ISBLANK(DAName1), ISBLANK(DAName2)), ", IF(ISBLANK(DAName2), DAName1 & " has been added to your policy as a delegated authority and can now access your information and make claims from your name", DAName1&" and "&DAName2&" have been added to your policy as delegated authority and they now have access to your information and can make claims on your behalf"))
This formula works like this:

Checks if both (DAName1) and (DAName2) are empty. If both are empty, an empty string is returned.
If (DAName1) contains data and (DAName2) does not, a message is returned indicating that (DAName1) has been added.
If both (DAName1) and (DAName2) contain data, a message is returned indicating that both have been added.
Hope this helps!
Reply With Quote
  #8  
Old 03-25-2024, 03:02 PM
Ren1975 Ren1975 is offline Multiple IF statement issue Windows 10 Multiple IF statement issue Office 2010
Novice
Multiple IF statement issue
 
Join Date: Mar 2024
Posts: 5
Ren1975 is on a distinguished road
Smile

Great thank you Tessa, much appreciated
Reply With Quote
  #9  
Old 03-27-2024, 06:23 AM
macropod's Avatar
macropod macropod is offline Multiple IF statement issue Windows 10 Multiple IF statement issue Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by TessaMurillo View Post
To achieve your goal you need to use the IF function in Excel with multiple conditions
=IF(AND(ISBLANK(DAName1), ISBLANK(DAName2)), ", IF(ISBLANK(DAName2), DAName1 & " has been added to your policy as a delegated authority and can now access your information and make claims from your name", DAName1&" and "&DAName2&" have been added to your policy as delegated authority and they now have access to your information and can make claims on your behalf"))
That's all very well if you're using Excel, but Word has no ISBLANK field function. Your formula syntax is wrong for Word, too.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2019: How to apply if statement for multiple values? Jamal NUMAN Excel 2 02-27-2021 01:11 AM
Multiple IF statement issue Multiple actions in an IF statement IanT Mail Merge 4 01-15-2021 03:13 AM
Multiple Projects in Multiple timelines Issue szimmer100 Project 0 11-12-2019 12:11 PM
Converting a Select statement in Excel to an update statement shabbaranks Excel Programming 5 10-31-2018 11:47 PM
Multiple IF statement issue Using multiple conditions with an IF statement?? to show a yes/no value BlindMouse Excel 1 01-27-2016 12:19 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:08 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft