Can you use countif +1?

Hi!

I am creating a results report that is updated weekly. I have a ton of variables that we're monitoring based off the week (i.e. week 1, week 2, etc..

I am wondering if I can save time with the weekly updates by using a COUNTIF formula but always have it increase by 1.

By this I mean:

=COUNTIF(reference sheet week column "1") for the week 1 total. I'd love to be able to add some type of +1 functionality so I could apply this formula to the whole row and and the COUNTIF reference would automatically count the next number (i.e. week 2, week 3, etc..)

I hope this makes sense!!

Best Answer

  • Mark Cronk
    Mark Cronk ✭✭✭✭✭✭
    Answer ✓

    Hi Christa,

    Too Easy. Try:

    =COUNTIFS({PLSC Report Full File Range 3}, [weeks]@row, {PLSC Report Full File Range 2}, "Auto", {PLSC Report Full File Range 1}, HAS(@cell, "Account Discount"))

    Work?

    Mark


    I'm grateful for your "Vote Up" or "Insightful". Thank you for contributing to the Community.

Answers

  • Mark Cronk
    Mark Cronk ✭✭✭✭✭✭

    Hi@Christa Brown,

    There are a few ways to do this. Which is best will depend on how complicated your sheet is. If you are counting or summing by week, then using the WEEKNUMBER() function will do it. Weeknumber determines the week of the year, from 1-52 or 53, for a date. Weeknumber(today()) is this week. Weeknumber(today())+1 is next week, -1 last week.

    It would be helpful to see your sheet structure, in a screenshot, and have more detail about what you want to do. Can you provide more?

    Happy to help more.

    Mark


    I'm grateful for your "Vote Up" or "Insightful". Thank you for contributing to the Community.

  • Thank you for the response - especially on a weekend! The WEEK function is great to know about! However, I don't think it'll work in this case.

    Specifically, I am tracking the # of weeks a program has been running with the start week being 1. I am gathering results by week using the week # in my formulas.

    So one that is being used a lot right now is: =COUNTIFS({WeekColumn}, "1").

    I am wondering if there is a way to adjust the formula to automatically increase the 1 to 2, 3, 4, and so on so I can convert the formulas to column formulas and not have to update the week #s with new week results.

    Thank you!

  • Mark Cronk
    Mark Cronk ✭✭✭✭✭✭

    Hi Christa,

    I'm not able to visualize what you're trying to do. Can you attach a screenshot? I'm confideny you can use a formula to automate your updates and avoid manual formula changes each week. To help I need to understand your sheets and reports.

    If the start week of every program is 1 then your formula, =COUNTIFS({WeekColumn}, "1"), is counting those programs in their 1st week. When you change the formula to =COUNTIFS({WeekColumn}, "2") you're now counting programs in their 2nd week, but you're no longer counting programs in their 1st week? Am I understanding this much?

    Your =COUNTIFS({WeekColumn}, "1") formula can be a column formula now. It meets the requirements.

    Mark


    I'm grateful for your "Vote Up" or "Insightful". Thank you for contributing to the Community.

  • 嗨!你的理解是正确的。我想要的to isolate each week's result's. Here's what one of the simpler tables looks like:

    image.png

    The formula I am using to get the Errors and the Weekly counts is:

    =COUNTIFS({PLSC Report Full File Range 3},"1", {PLSC Report Full File Range 2}, "Auto", {PLSC Report Full File Range 1}, HAS(@cell, "Account Discount"))

    我希望的是我能自动ally increase the week from 1 to 2 to 3, etc.. that the COUNTIF formula looks for vs. manually updating the week from "1" to "2" etc... (the bolded text) in the formula).

  • Mark Cronk
    Mark Cronk ✭✭✭✭✭✭
    Answer ✓

    Hi Christa,

    Too Easy. Try:

    =COUNTIFS({PLSC Report Full File Range 3}, [weeks]@row, {PLSC Report Full File Range 2}, "Auto", {PLSC Report Full File Range 1}, HAS(@cell, "Account Discount"))

    Work?

    Mark


    I'm grateful for your "Vote Up" or "Insightful". Thank you for contributing to the Community.

  • That DID IT!! This will save so much time in weekly updates!! There are 50+ish variables that I was not looking forward to updating!


    Thank you so much!

  • Mark Cronk
    Mark Cronk ✭✭✭✭✭✭

    Happy to help. Appreciate you contributing to the Community.

    Be Well, Mark


    I'm grateful for your "Vote Up" or "Insightful". Thank you for contributing to the Community.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out theFormula Handbook template!
Try this:<\/p>

=COUNTIFS(Status:Status, =\"Full\", [Media Type]:[Media Type], OR(@cell = \"Press Release\", @cell = \"News Release on CHA.com\")<\/strong>, [Completion Date]:[Completion Date],<\/p><\/div><\/div>


<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":322,"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions","allowedDiscussionTypes":["discussion","question"]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[]},{"discussionID":112389,"type":"question","name":"Formula to create \"all that apply\" for Knowledge Check Form","excerpt":"Hello Community, I am currently creating a knowledge check and was wondering if there was a formula to create an \"all that apply\" type of question. For example: 5. What is on the customer experience call flow? Smile Engage Trust Own Listen This is my broken formula: =IF(CONTAINS((\"Trust\", \"Smile\", “Own”), [5. What is on…","snippet":"Hello Community, I am currently creating a knowledge check and was wondering if there was a formula to create an \"all that apply\" type of question. For example: 5. What is on the…","categoryID":322,"dateInserted":"2023-10-31T17:20:52+00:00","dateUpdated":null,"dateLastComment":"2023-10-31T18:17:19+00:00","insertUserID":169329,"insertUser":{"userID":169329,"name":"Michael_Selfe","title":"Just looking to learn","url":"https:\/\/community.smartsheet.com\/profile\/Michael_Selfe","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-10-31T18:49:43+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":165153,"lastUser":{"userID":165153,"name":"DKazatsky2","url":"https:\/\/community.smartsheet.com\/profile\/DKazatsky2","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-10-31T19:20:54+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":26,"score":null,"hot":3397550291,"url":"https:\/\/community.smartsheet.com\/discussion\/112389\/formula-to-create-all-that-apply-for-knowledge-check-form","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/112389\/formula-to-create-all-that-apply-for-knowledge-check-form","format":"Rich","tagIDs":[254],"lastPost":{"discussionID":112389,"commentID":402434,"name":"Re: Formula to create \"all that apply\" for Knowledge Check Form","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/402434#Comment_402434","dateInserted":"2023-10-31T18:17:19+00:00","insertUserID":165153,"insertUser":{"userID":165153,"name":"DKazatsky2","url":"https:\/\/community.smartsheet.com\/profile\/DKazatsky2","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-10-31T19:20:54+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Get Help","url":"https:\/\/community.smartsheet.com\/categories\/get-help"},{"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-10-31T18:49:41+00:00","dateAnswered":"2023-10-31T18:17:19+00:00","acceptedAnswers":[{"commentID":402434,"body":"

Hi @Michael_Selfe<\/a> ,<\/p>

Try something like this.<\/p>

=IF(COUNTM([5. What is on the customer experience call flow?]@row) = 3, IF(AND(HAS([5. What is on the customer experience call flow?]@row, \"Trust\"), HAS([5. What is on the customer experience call flow?]@row, \"Smile\"), HAS([5. What is on the customer experience call flow?]@row, \"Own\")), \"Correct\", \"Wrong\"))<\/p>

This assumes you wanted all 3 items to be checked.<\/p>

Hope this helps,<\/p>

Dave<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":322,"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions","allowedDiscussionTypes":["discussion","question"]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[{"tagID":254,"urlcode":"formulas","name":"Formulas"}]},{"discussionID":112379,"type":"question","name":"IF, AND, and OR equation","excerpt":"Hello. I am trying to make an IF, AND equation with one of the constituents in the AND equation to have an OR function. The equation would go for the \"Amount paid\" column. The constituents would be \"# of pets\", \"Talent\" and \"Time\". The \"Amount paid\" would be $125 if # of pets=1, Talent= External OR Rescue and Time=Half.…","snippet":"Hello. I am trying to make an IF, AND equation with one of the constituents in the AND equation to have an OR function. The equation would go for the \"Amount paid\" column. The…","categoryID":322,"dateInserted":"2023-10-31T15:48:15+00:00","dateUpdated":null,"dateLastComment":"2023-10-31T16:58:36+00:00","insertUserID":166827,"insertUser":{"userID":166827,"name":"mpajuelo","url":"https:\/\/community.smartsheet.com\/profile\/mpajuelo","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-10-31T19:24:08+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":166827,"lastUser":{"userID":166827,"name":"mpajuelo","url":"https:\/\/community.smartsheet.com\/profile\/mpajuelo","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-10-31T19:24:08+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":24,"score":null,"hot":3397540011,"url":"https:\/\/community.smartsheet.com\/discussion\/112379\/if-and-and-or-equation","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/112379\/if-and-and-or-equation","format":"Rich","lastPost":{"discussionID":112379,"commentID":402414,"name":"Re: IF, AND, and OR equation","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/402414#Comment_402414","dateInserted":"2023-10-31T16:58:36+00:00","insertUserID":166827,"insertUser":{"userID":166827,"name":"mpajuelo","url":"https:\/\/community.smartsheet.com\/profile\/mpajuelo","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-10-31T19:24:08+00:00","banned":0,"punished":0,"private":false,"label":"✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Get Help","url":"https:\/\/community.smartsheet.com\/categories\/get-help"},{"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"image":{"url":"https:\/\/us.v-cdn.net\/6031209\/uploads\/UR7CB4IY38ET\/image.png","urlSrcSet":{"10":"https:\/\/us.v-cdn.net\/cdn-cgi\/image\/fit=scale-down,width=10\/https:\/\/us.v-cdn.net\/6031209\/uploads\/UR7CB4IY38ET\/image.png","300":"https:\/\/us.v-cdn.net\/cdn-cgi\/image\/fit=scale-down,width=300\/https:\/\/us.v-cdn.net\/6031209\/uploads\/UR7CB4IY38ET\/image.png","800":"https:\/\/us.v-cdn.net\/cdn-cgi\/image\/fit=scale-down,width=800\/https:\/\/us.v-cdn.net\/6031209\/uploads\/UR7CB4IY38ET\/image.png","1200":"https:\/\/us.v-cdn.net\/cdn-cgi\/image\/fit=scale-down,width=1200\/https:\/\/us.v-cdn.net\/6031209\/uploads\/UR7CB4IY38ET\/image.png","1600":"https:\/\/us.v-cdn.net\/cdn-cgi\/image\/fit=scale-down,width=1600\/https:\/\/us.v-cdn.net\/6031209\/uploads\/UR7CB4IY38ET\/image.png"},"alt":"image.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2023-10-31T18:27:39+00:00","dateAnswered":"2023-10-31T16:30:04+00:00","acceptedAnswers":[{"commentID":402406,"body":"

@mpajuelo<\/a> Try this instead: =IF(AND(AND(OR(Talent@row = \"External\", Talent@row = \"Rescue\"), [# of pets]@row = 1), Time@row = \"Half\"), \"125\", \"//www.santa-greenland.com/community/discussion/74683/\")<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":322,"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions","allowedDiscussionTypes":["discussion","question"]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[]}],"initialPaging":{"nextURL":"https:\/\/community.smartsheet.com\/api\/v2\/discussions?page=2&categoryID=322&includeChildCategories=1&type%5B0%5D=Question&excludeHiddenCategories=1&sort=-hot&limit=3&expand%5B0%5D=all&expand%5B1%5D=-body&expand%5B2%5D=insertUser&expand%5B3%5D=lastUser&status=accepted","prevURL":null,"currentPage":1,"total":10000,"limit":3},"title":"Trending in Formulas and Functions ","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">

Trending in Formulas and Functions