IF AND CONTAINS with >=TODAY(-7)
Hi,
I have a formula I need help with please,
=IF(AND(CONTAINS([Client Name]@row, {Sheet A Range 1}), IF({Sheet A Range 2}, >=TODAY(-7))), "Match")
______________
Name = Text column
Sheet A Range 1 = Text column
Sheet A Range 2 = Date column
______________
Any idea how to correct this #INVALID DATA TYPE?
Thank you!
Best Answers
-
"Paul Newcome
Paul Newcome ✭✭✭✭✭✭
4:59PM
Give this a try:
=IF(COUNTIFS({Sheet A Range 1}, CONTAINS([Client Name]@row, @cell), {Sheet A Range 2}, @cell>= TODAY(-7))> 0, "Match")
10xViz.com
Come see me at ENGAGE 2023! If you can't find me roaming the floor, I will most likely be at the 10xViz Partner Booth. I will also be doing a short demonstration in the Experience Hub Theater on Tuesday! "
-
Hey @A Rose
In your second COUNTIFS you'll just need to remove the >1 bit of it.
=IF(COUNTIFS([Client Name]:[Client Name], [Client Name]@row) > 1, COUNTIFS([Client Name]:[Client Name], [Client Name]@row))
What would you like it to do if the count is just 1? Currently this will return a blank cell.
Cheers,
Genevieve
Answers
-
What exactly are you trying to accomplish?
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
I want to see if this specific client was added to sheet A within the past 7 days.
Sheet A Range 2 = Date Created
thanks
-
Give this a try:
=IF(AND(CONTAINS([Client Name]@row, {Sheet A Range 1}), IF({Sheet A Range 2}, >=TODAY(-7))), "Match")
=IF(COUNTIFS({Sheet A Range 1}, CONTAINS([Client Name]@row, @cell), {Sheet A Range 2}, @cell>= TODAY(-7))> 0, "Match")
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
Hi,
New formula:
=IF(COUNTIFS({Sheet A Range 1}, CONTAINS([Client Name]@row, @cell), {Sheet A Range 2}, @cell >= TODAY(-7))> 0, "Match")
The response is:
#INCORRECT ARGUMENT SET
Thanks,
-
Double check that both ranges are in fact set as single column references.
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
Genius!
Reference 1 was originally a vlookup referencing two columns...
Thank you so much @Paul Newcome !!
-
"Paul Newcome
Paul Newcome ✭✭✭✭✭✭
4:59PM
Give this a try:
=IF(COUNTIFS({Sheet A Range 1}, CONTAINS([Client Name]@row, @cell), {Sheet A Range 2}, @cell>= TODAY(-7))> 0, "Match")
10xViz.com
Come see me at ENGAGE 2023! If you can't find me roaming the floor, I will most likely be at the 10xViz Partner Booth. I will also be doing a short demonstration in the Experience Hub Theater on Tuesday! "
-
Happy to help. 👍️
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
Hi @Paul Newcome,
I have a similar question,
I hope you can help out on this as well,
I want to see - for clients that are on this sheet more than once - how many times this client is on this sheet,
My formula returns 0 for those with more than one name in the name column,
=IF(COUNTIFS([Client Name]:[Client Name], [Client Name]@row) > 1, COUNTIFS([Client Name]:[Client Name], [Client Name]@row > 1))
Thank you,
-
Hey @A Rose
In your second COUNTIFS you'll just need to remove the >1 bit of it.
=IF(COUNTIFS([Client Name]:[Client Name], [Client Name]@row) > 1, COUNTIFS([Client Name]:[Client Name], [Client Name]@row))
What would you like it to do if the count is just 1? Currently this will return a blank cell.
Cheers,
Genevieve
-
@A Rose In addition to @Genevieve P.'s response, you will also need to incorporate a HAS or CONTAINS function depending on the source data. If the source data is in a multi-select column, your criteria with the HAS function would be
HAS(@cell, [Client Name]@row)
If it is not a multi-select column, you would use the CONTAINS function.
CONTAINS([Client Name]@row, @cell)
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
Hi @Genevieve P.,
Thanks for that!
Those are regular columns, thanks for the tip! you're always here to help out and I appreciate that!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63K Get Help
- 380 Global Discussions
- 212 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 305 Events
- 34 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!