Help with proofreading the formula SUM(IF(FREQUENCY(IF...

virtuosok

Board Regular
Joined
Sep 2, 2020
Messages
137
Office Version
  1. 2016
Platform
  1. Windows
Hi,
I am struggling with the below array formula as it returns a "too few arguments" error.
Excel Formula:
=SUM(IF(FREQUENCY(IF('Medication log'!$E$13:$E$50000=C2,IF('Medication log'!$H$13:$H$50000,"Yes",IFERROR('Medication log'!$F$13:$F$50000+0, "")))),ROW(INDIRECT("44044:45100")))+FREQUENCY(IF('Reminder diary'!$E$13:$E$50000=C2,IF(‘Reminder diary’!$S$13:$S$50000,”Yes”,IFERROR('Reminder diary'!$F$13:$F$50000+0,""))),ROW(INDIRECT("44044:45100"))),1))
Legend:
- analyzing data on Medication log - and on Reminder diary tabs, for cases when entries in column E matches entry in cell C2 on "main" tab
- the goal is to have total number of unique dates across both tabs (there may be partial overlap) for the condition in previous bullet; dates are listed in column F on both tabs
- at the same time, these unique dates must only be counted when there's also a "Yes" in column H in Medication log tab, or "Yes" in column S in Reminder diary tab. Otherwise these dates should be ignored in overall calc.
What am I doing wrong please?
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
56,969
Office Version
  1. 365
Platform
  1. Windows
Your formula is looking at col S on the Medication Log sheet, but that's blank. Should it be looking at H?
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

virtuosok

Board Regular
Joined
Sep 2, 2020
Messages
137
Office Version
  1. 2016
Platform
  1. Windows
Oh yes, indeed, by changing to H the formula works! Thanks you BOTH, I know the references to different columns in different tabs did not help to simplify the case.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
56,969
Office Version
  1. 365
Platform
  1. Windows
Glad we could help & thanks for the feedback.
 

Watch MrExcel Video

Forum statistics

Threads
1,130,318
Messages
5,641,501
Members
417,213
Latest member
wikk

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
Top