Don't use data in row if a cell in a column of that row has 'X' value?

Zack0611

New Member
Joined
Mar 24, 2023
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
I don't know if this is possible at all, I've been trying to research it all day and have found nothing.

I am looking for a formula that will count the total number of cells in column B but not count the value of a cell if "Discontinued" is in the same row but in column C or D.

Thank you for your time, or please ask if there is anything I can make more clear!

1679687866934.png
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
so is your expected result 34 or 36?
 
Upvote 0
Not sure what result you want, here are 3 formulas.
mr excel questions 17.xlsm
ABCDE
1Test Material
2Subject Number
3123B,C,D Discontinue
4100034
52000only C,D Discontinue
6300034
74000Only B Disocontinue
850 Hr0 Hr035
960.500
107000
118000
129000
1310000
1411000
1512000
1613000
17141 Hr0.50.5
1815000
1916000
2017000
2118000
2219DISCONTINUEDDISCONTINUEDDISCONTINUED
2320000
24210.500
2522000
2623000
2724000
2825000
2926000
30270 HrDISCONTINUEDDISCONTINUED
3128.5 d00
3229000
3330DISCONTINUEDDISCONTINUEDDISCONTINUED
3431000
3532000
36330.50.50
3734.5 d00
3835000
3936000
4037000
Sheet5
Cell Formulas
RangeFormula
E4E4=SUMPRODUCT((--("DISCONTINUED"<>$B$4:$B$40))*(--("DISCONTINUED"<>$C$4:$C$40))*(--("DISCONTINUED"<>$D$4:$D$40)))
E6E6=SUMPRODUCT((--("DISCONTINUED"<>$C$4:$C$40))*(--("DISCONTINUED"<>$D$4:$D$40)))
E8E8=SUMPRODUCT((--("DISCONTINUED"<>$B$4:$B$40)))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
okay, well, it seems one of the suggestions I gave above will work for you.
 
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,332
Members
449,077
Latest member
jmsotelo

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