IF function with array

tigerzen

Board Regular
Joined
Mar 8, 2023
Messages
165
Office Version
  1. 365
Platform
  1. Windows
Need some help with this, I think I'm close but need something to connect C10 the headings and need a single figure rather than the array that I'm getting in cell D10.
Book1
ABCDEFGHIJKLMNOPQRSTUV
1OpponentResultKI ForKI AgainstKI DiffMKMK ForMK AgainstMK DiffHBHB ForHB AgainstHB DiffDIDI ForDI AgainstDI DiffGLGL ForGL AgainstGL Diff
2R1Team AD228221795-979597-2121-1201211201349-34134934188-8880
3R2Team BW209216-794-9494940139-142139142-3348-358348358-1017-1017107
4R3Team CL219229-1076-65766511137-171137171-34356-400356400-447-878-1
5R4Team DW218239-2172-937293-21174-12517412549392-3643923642812-1212120
6R5Team EW217238-2185-888588-3164-12916412935381-3673813671411-181118-7
7R6Team FW223215881-10381103-22136-166136166-30349-381349381-3211-151115-4
8R7Team GL200254-5496-13596135-39139-12613912613339-380339380-416-11611-5
9
10KI Diff 1
11MK Diff
12HB Diff
13DI Diff
14GL Diff
15
16Desired
17KI Diff1
18MK Diff0
19HB Diff2
20DI Diff2
21GL Diff1
Sheet1
Cell Formulas
RangeFormula
C10:C14,C17:C21C10=TRANSPOSE(FILTER($D$1:$CH$1,RIGHT($D$1:$CH$1,4)="Diff",""))
D10:V10D10=IF(C10=$D$1:$V$1,COUNTIFS($C$2:$C$8,"W",$F$2:$F$8,">0"),"")
Dynamic array formulas.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
How about
Excel Formula:
=BYROW(C10#,LAMBDA(br,COUNTIFS($C$2:$C$8,"W",INDEX($F$2:$V$8,,XMATCH(br,F1:V1)),">0")))
 
Upvote 0
Thanks Fluff, would you mind giving me the Excel 2019 solution if possible?
 
Upvote 0
If you need a formula to work in versions other than your profile then you should say so at the the start.
Try
Excel Formula:
=COUNTIFS($C$2:$C$8,"W",INDEX($F$2:$V$8,,MATCH(C10,$F$1:$V$1,0)),">0")
 
Upvote 0
Solution
If you need a formula to work in versions other than your profile then you should say so at the the start.
Try
Excel Formula:
=COUNTIFS($C$2:$C$8,"W",INDEX($F$2:$V$8,,MATCH(C10,$F$1:$V$1,0)),">0")
Thanks Fluff, my apologies, I had meant to mention the earlier version but I forgot to.
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,581
Messages
6,125,656
Members
449,247
Latest member
wingedshoes

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