# Need help with a formula

✭✭✭✭

=COUNTIFS({Demand State}, [Primary Column]@row, {Investment Class}, "Grow", {Portfolio}, "P&C Claims", <=DATE(2023, 1, 1), {Demand Opened Date}, >=DATE(2023, 12, 31))

Can someone help me figure out why it's not working?

Tags:

• ✭✭✭✭✭✭

Then this should be your formula:

=COUNTIFS({Demand State}, [Primary Column]@row, {Investment Class}, "Grow", {Portfolio}, "P&C Claims", {Demand Opened Date},and(@cell>=DATE(2023, 1, 1), @cell <=DATE(2023, 12, 31)))

• ✭✭✭✭✭✭

Not sure what you are trying to accomplish with the dates but you seem to be missing a {range} between "P&C Claims", and <=DATE(2023, 1, 1).

Is the below what you are looking for?

=COUNTIFS({Demand State}, [Primary Column]@row, {Investment Class}, "Grow", {Portfolio}, "P&C Claims", {Demand Opened Date},and(@cell<=DATE(2023, 1, 1), @cell >=DATE(2023, 12, 31)))

• ✭✭✭✭

I am trying to count how many times [Primary Column]@row, when the Investment class is Grow, the Portfolio is P&C Claims, and the Demand Opened Date is between 01/01/23 - 12/31/23.

• ✭✭✭✭

@Leibel S please see explanation above.

• ✭✭✭✭✭✭

Then this should be your formula:

=COUNTIFS({Demand State}, [Primary Column]@row, {Investment Class}, "Grow", {Portfolio}, "P&C Claims", {Demand Opened Date},and(@cell>=DATE(2023, 1, 1), @cell <=DATE(2023, 12, 31)))

• ✭✭✭✭

Thank you! That worked!

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!