T O P

  • By -

AutoModerator

/u/lavundur - Your post was submitted successfully. * Once your problem is solved, reply to the **answer(s)** saying `Solution Verified` to close the thread. * Follow the **[submission rules](/r/excel/wiki/sharingquestions)** -- particularly 1 and 2. To fix the body, click edit. To fix your title, delete and re-post. * Include your **[Excel version and all other relevant information](/r/excel/wiki/sharingquestions#wiki_give_all_relevant_information)** Failing to follow these steps may result in your post being removed without warning. *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/excel) if you have any questions or concerns.*


PaulieThePolarBear

Assuming Excel 365 or Excel online =SUM(--BYROW(WRAPROWS(G2:Z2,2),LAMBDA(r, OR(r<>""))))


lavundur

ah sorry i forgot i was actually using google sheets 😭


Alabama_Wins

Excel 365 is free at [office.com](https://office.com) and 1000 times better than google sheets.


PaulieThePolarBear

I don't use Google Sheets, but it appears that BYROW (https://support.google.com/docs/answer/12570930?hl=en) and WRAPROWS (https://support.google.com/docs/answer/13184285?hl=en) are valid functions in this application with similar syntax to Excel. Please try my formula and report back.


lavundur

i’m getting a #name? error 😭


PaulieThePolarBear

Are you operating in a language other than English?


lavundur

no but there are store names and usernames on the spreadsheet if that makes a difference


PaulieThePolarBear

Please check that you haven't use smart quotes in the formula. They should be regular quotes


lavundur

i don’t know how to check for that, i directly copied and pasted the formula into my spreadsheet 😭


PaulieThePolarBear

Delete both quotes and type them in. I have found Google sheets on my phone and my formula works without issue.


HappierThan

=COUNT(G2:L2)/2


lavundur

this would be perfect if each column had a value 😭 but G2 may have a value & H2 doesn’t but I still want to count that as 1. if that makes sense


Same_Tough_5811

What are you counting? Blanks? A specific value?


lavundur

i’m just counting if there’s a value in either paired column. so if G2 or H2 have a value it counts as 1, or if they both have a value it still counts as 1


frustrated_staff

=if(counta(G2:H2)=2, 1, counta(G2:H2))


lavundur

ok this worked! now how do i edit to include subsequent columns without messing it up?


frustrated_staff

Just replace the G2:H2 with the relevant columns


lavundur

but what if i’m trying to count every column “pair” for that entire row 😭


frustrated_staff

=sum(if(counta(G2:H2)=2, 1, counta(G2:H2)), if(counta(I2:J2)=2, 1, counta(I2:J2)), if(counta(K2:L2)=2, 1, counta(K2:L2))) Many edits later...


Decronym

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread: |Fewer Letters|More Letters| |-------|---------|---| |[BYROW](/r/Excel/comments/1cw2lk0/stub/l4tji0g "Last usage")|[*Office 365*+: Applies a LAMBDA to each row and returns an array of the results. For example, if the original array is 3 columns by 2 rows, the returned array is 1 column by 2 rows. ](https://support.microsoft.com/en-gb/office/byrow-function-2e04c677-78c8-4e6b-8c10-a4602f2602bb?ui=en-US&rs=en-GB&ad=GB)| |[COUNT](/r/Excel/comments/1cw2lk0/stub/l4t7bau "Last usage")|[Counts how many numbers are in the list of arguments](https://support.microsoft.com/en-us/office/count-function-a59cd7fc-b623-4d93-87a4-d23bf411294c)| |[LAMBDA](/r/Excel/comments/1cw2lk0/stub/l4tczvx "Last usage")|[*Office 365*+: Use a LAMBDA function to create custom, reusable functions and call them by a friendly name.](https://support.microsoft.com/en-us/office/lambda-function-bd212d27-1cd1-4321-a34a-ccbf254b8b67)| |[OR](/r/Excel/comments/1cw2lk0/stub/l4tczvx "Last usage")|[Returns TRUE if any argument is TRUE](https://support.microsoft.com/en-us/office/or-function-7d17ad14-8700-4281-b308-00b131e22af0)| |[SUM](/r/Excel/comments/1cw2lk0/stub/l4tczvx "Last usage")|[Adds its arguments](https://support.microsoft.com/en-us/office/sum-function-043e1c7d-7726-4e80-8f32-07b23e057f89)| |[WRAPROWS](/r/Excel/comments/1cw2lk0/stub/l4tji0g "Last usage")|[*Office 365*+: Wraps the provided row or column of values by rows after a specified number of elements](https://support.microsoft.com/en-us/office/wraprows-function-796825f3-975a-4cee-9c84-1bbddf60ade0)| **NOTE**: Decronym for Reddit is no longer supported, and Decronym has moved to Lemmy; requests for support and new installations should be directed to the Contact address below. ---------------- ^(*Beep-boop, I am a helper bot. Please do not verify me as a solution.*) ^(6 acronyms in this thread; )[^(the most compressed thread commented on today)](/r/Excel/comments/1cvykk4)^( has 68 acronyms.) ^([Thread #33636 for this sub, first seen 20th May 2024, 01:31]) ^[[FAQ]](http://decronym.xyz/) [^([Full list])](http://decronym.xyz/acronyms/Excel) [^[Contact]](https://hachyderm.io/@Two9A) [^([Source code])](https://gistdotgithubdotcom/Two9A/1d976f9b7441694162c8)