🤩<\/span><\/p>"},{"commentID":346400,"body":"If you want it to only apply to parent rows then it would look more like this:<\/p>
=IF(COUNT(CHILDREN([Task Name]@row)) <> 0, <\/strong>INDEX({CI Weight}, MATCH([Task Name]@row, {Project Name}, 0)))<\/strong><\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question","log":{"dateUpdated":"2022-10-06 20:52:07","updateUser":{"userID":134324,"name":"Marcela Hernandez","url":"https:\/\/community.smartsheet.com\/profile\/Marcela%20Hernandez","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-10-07T03:32:32+00:00","banned":0,"punished":0,"private":false,"label":"✭"}}},"bookmarked":false,"unread":false,"category":{"categoryID":322,"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions","allowedDiscussionTypes":[]},"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":96312,"type":"question","name":"Can I use the Countif function to count the amount of times one column is greater than another?","excerpt":"For example, in my Smartsheet I have two columns that I would like to compare data. \"Sprinkler Head Count (Estimated)\" versus \"Sprinkler Head Count (Actual).\" I would like to count how many times in my sheet where the Actual head count is greater than the Estimated head count. Any ideas how we can achieve this? Thanks in…","categoryID":322,"dateInserted":"2022-10-06T17:10:54+00:00","dateUpdated":null,"dateLastComment":"2022-10-06T17:16:52+00:00","insertUserID":151299,"insertUser":{"userID":151299,"name":"lcain","url":"https:\/\/community.smartsheet.com\/profile\/lcain","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-10-06T20:25:53+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":145151,"lastUser":{"userID":145151,"name":"Mike TV","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Mike%20TV","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/AItbvmniEdReOVTwaHHrhgrOiwux3krYT43KIqrvf5FW=s96-c","dateLastActive":"2022-10-07T00:06:50+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":26,"score":null,"hot":3330154666,"url":"https:\/\/community.smartsheet.com\/discussion\/96312\/can-i-use-the-countif-function-to-count-the-amount-of-times-one-column-is-greater-than-another","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/96312\/can-i-use-the-countif-function-to-count-the-amount-of-times-one-column-is-greater-than-another","format":"Rich","lastPost":{"discussionID":96312,"commentID":346312,"name":"Re: Can I use the Countif function to count the amount of times one column is greater than another?","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/346312#Comment_346312","dateInserted":"2022-10-06T17:16:52+00:00","insertUserID":145151,"insertUser":{"userID":145151,"name":"Mike TV","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Mike%20TV","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/AItbvmniEdReOVTwaHHrhgrOiwux3krYT43KIqrvf5FW=s96-c","dateLastActive":"2022-10-07T00:06:50+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"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\/XULU5EB0Y7VE\/estimate-v-actual.png","urlSrcSet":{"10":"","300":"","800":"","1200":"","1600":""},"alt":"Estimate v Actual.png"},"attributes":{"question":{"status":"accepted","dateAccepted":"2022-10-06T17:15:39+00:00","dateAnswered":"2022-10-06T17:14:49+00:00","acceptedAnswers":[{"commentID":346310,"body":"create a checkbox column with this formula: <\/p>
=if(Sprinkler Head Count (Actual) >Sprinkler Head Count (Estimated),1,0)<\/p>
Then you can do a countif statement counting the checkboxes: =countif([checkbox column]:[checkbox column],1)<\/p>"},{"commentID":346312,"body":"
@lcain<\/a> <\/p>I'm not sure if it can be done with a single formula. Here's what I would do.<\/p>
Create a helper column that's a checkbox column called something like \"Sprinkler (helper)\". Write this formula into it:<\/p>
=IF([Sprinkler Head Count (Actual)]@row>[Sprinkler Head Count (Estimated)]@row, 1)<\/p>
Then hide that column since you don't need to look at it on your sheet. Then in the column you want the count use this formula:<\/p>
=COUNTIF([Sprinkler (helper)]:[Sprinkler (helper)], 1)<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question","log":{"dateUpdated":"2022-10-06 17:15:39","updateUser":{"userID":151299,"name":"lcain","url":"https:\/\/community.smartsheet.com\/profile\/lcain","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2022-10-06T20:25:53+00:00","banned":0,"punished":0,"private":false,"label":"✭"}}},"bookmarked":false,"unread":false,"category":{"categoryID":322,"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions","allowedDiscussionTypes":[]},"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":[]}],"title":"Trending in Formulas and Functions ","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">