IIF Statement Trouble

skumar14

New Member
Joined
Nov 7, 2014
Messages
10
Hello,

I was hoping someone could help me with this problem or let me know if it isn't possible. I have three fields Contract Number, Sustainable, and Total Amount. The sustainable field is a flag with 0 or 1. In my data set i keep on getting duplicates for the contract number because in some instances the flag is 0 and others its 1. I would like to create a new field "Final sustainable field" with the IIF statement that says if the contract number has the flag of 0 and 1 then make it 1 and leave all the other values as is. Is this possible, any help would be appreciated.

Thanks!
 
Hey Joe i just realized because since this is part of a series of queries that i am using to build a report I could actually take the max value in one of my earlier temp tables and i get the correct results. However I wouldn't have thought about that without your help, I'm sorry if i wasted your time but thanks for all your help it pushed me in the right direction!
 
Upvote 0

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
You are welcome. Glad you got it figured out.
 
Upvote 0

Forum statistics

Threads
1,221,876
Messages
6,162,567
Members
451,775
Latest member
Aiden Jenner

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top