Multiple Ifs based on Occurances

Squad

New Member
Joined
Jul 18, 2011
Messages
32
What im trying to do is best described below in the solve section below. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p><o:p></o:p>
Solve:<o:p></o:p><o:p></o:p>
Show “1” where multiple orders occur (with the same order number) AND where multiple product types exist<o:p></o:p>
-AND-<o:p></o:p>
Show “0” where multiple orders occur (with the same order number) AND where single product types exist<o:p></o:p>
-AND-<o:p></o:p>
Show “0” where single orders occur<o:p></o:p><o:p></o:p><o:p></o:p>
Data has: Order Numbers & Product Type

Excel Workbook
BCD
3Order NumbersProduct Type??Solve??
483934Air Max0
583934Air Max0
683934Air Max0
783934Air Max0
883934Air Max0
920493Legend1
1020493Legend1
1120493Classic1
1247623Air Max1
1347623Legend1
1447623Classic0
1547623Classic0
1633343Legend0
1771671Classic0
1871671Classic0
1968500Air Max1
2068500Classic1
Sheet2
Excel 2007



<o:p></o:p>
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
You could use an IF statement to test for a COUNT in each Column, eg..

IF(and(countif(b:b,b4)>1,countif(c:c,c4)>1),1,0)

HTH
 
Upvote 0
I'm a little Stumped by your Data
20493 Legend are both 1, however
47623 Classic are both 0.

if 20493 are the correct lines.
Try:
Code:
=--(SUMPRODUCT(--($C$4:$C$20=C4),--($D$4:$D$20=D4))<>SUMPRODUCT(--($C$4:$C$20=C4)))

I do not have 2007 but Countifs should work better in 2007
From what I have read about Sumifs
 
Upvote 0
I'm a little Stumped by your Data
20493 Legend are both 1

Sorry, let me try and explain.

The data i have will be found in columns B and C of my previous post. I am looking for a formula to give me the results found in column D labeled ?? Solved??.

The data within can have single and multiple order numbers. The reason multiple order numbers exist is:

a) Because there are multiple products within the same order which would be illustrated line by line)
-or-
b) Due to a completion date (some companies like for us to send them a product when they are ready for it). So even though they might have multiple orders of the same product, we illustrate the data line by line.

The formula in column d should resemble the following:

Show “1” where multiple orders occur (with the same order number) AND where multiple product types exist<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
-AND-<o:p></o:p>
Show “0” where multiple orders occur (with the same order number) AND where single product types exist<o:p></o:p>
-AND-<o:p></o:p>
Show “0” where single orders occur

<o:p>What this will do is identify multiple order numbers where there is a mix of products. The "1" will identify this while the "0" will show orders that shouldnt be considered within an analysis.</o:p>
 
Last edited:
Upvote 0
Show “1” where multiple orders occur (with the same order number) AND where multiple product types exist<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>

47623 Classic both lines should be 1 per the above line.

In which case this will work (adjusted to columns B & C)
Code:
=--(SUMPRODUCT(--($B$4:$B$20=B4),--($C$4:$C$20=C4))<>SUMPRODUCT(--($B$4:$B$20=B4)))
 
Upvote 0
47623 Classic both lines should be 1 per the above line.

In which case this will work (adjusted to columns B & C)
Code:
=--(SUMPRODUCT(--($B$4:$B$20=B4),--($C$4:$C$20=C4))<>SUMPRODUCT(--($B$4:$B$20=B4)))

That is correct. The data should look like this
Excel Workbook
BCD
3Order NumbersProduct Type??Solve??
483934Air Max0
583934Air Max0
683934Air Max0
783934Air Max0
883934Air Max0
920493Legend1
1020493Legend1
1120493Classic1
1247623Air Max1
1347623Legend1
1447623Classic1
1547623Classic1
1633343Legend0
1771671Classic0
1871671Classic0
1968500Air Max1
2068500Classic1
Sheet2
Excel 2007


However, your formula returns all zeros
 
Upvote 0

Forum statistics

Threads
1,224,594
Messages
6,179,795
Members
452,943
Latest member
Newbie4296

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