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

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
You are welcome. Glad you got it figured out.
 
Upvote 0

Forum statistics

Threads
1,226,207
Messages
6,189,620
Members
453,559
Latest member
Not_Again

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