If Formula

eramirez148

Board Regular
Joined
Aug 17, 2022
Messages
66
Office Version
  1. 365
  2. 2021
  3. 2019
  4. 2016
  5. 2013
  6. 2011
  7. 2010
Platform
  1. Windows
  2. MacOS
How can I get the following results in column C and Column D

Column C = if column B hits 100% then the results in column C should say "yes" other wise empty cell
Column D = should create a percentage based on how many items hit 100% in column A. I have three products in column A product 1,2 and 3. If 2 out of three hit 100% then the return in column D should be 67%

Column AColumn BColumn CColumn D
Product 110%
Product 120%
Product 130%
Product 140%
Product 150%
Product 160%
Product 250%
Product 260%
Product 270%
Product 280%
Product 290%
Product 2100%Yes67%
Product 2110%
Product 2120%
Product 350%
Product 360%
Product 370%
Product 3100%Yes67%
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Does this work?
Book2
ABCD
1Column AColumn BColumn CColumn D
2Product 110%  
3Product 120%  
4Product 130%  
5Product 140%  
6Product 150%  
7Product 160%  
8Product 250%  
9Product 260%  
10Product 270%  
11Product 280%  
12Product 290%  
13Product 2100%Yes67%
14Product 2110% 
15Product 2120% 
16Product 350% 
17Product 360% 
18Product 370% 
19Product 3100%Yes67%
Sheet5
Cell Formulas
RangeFormula
C2:C12C2=IF(B2=1,"Yes","")
D2:D19D2=IF(C2="Yes",COUNTIFS($B$2:$B$19,1)/COUNTA(UNIQUE($A$2:$A$19)),"")
 
Upvote 0
Solution
What version of Excel are you using?

If you are using 365, here is a spill version:

Excel Formula:
=LET(a,A2:A19,b,B2:B19,HSTACK(BYROW(b,LAMBDA(r,IF(r=1,"Yes",""))),BYROW(b,LAMBDA(r,IF(r=1,COUNTIF(b,1)/COUNTA(UNIQUE(a)),"")))))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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