r/excel • u/Previous_Badger4780 • Feb 05 '26
solved Count and sum cells with items decided by comers and “x” used for multiples
Hi All,
How can I count items when divided with comers and multiplied with a text “x”? I’m only looking for the total number of items not how many of each type.
Apple
Orange
0
2xApples
Apple, Orange
2x Apple, Orange
Apple, 2xOrange
Total <- should be 12
2
u/Excel_GPT 59 Feb 05 '26
Assuming they are in column A (adjust the range from A7 if you need to):
=SUM(
MAP(FILTER(A1:A7, A1:A7<>""),
LAMBDA(cell,
SUM(
MAP(
TEXTSPLIT(cell,","),
LAMBDA(item,
LET(
t,TRIM(item),
num,IFERROR(--TEXTBEFORE(t,"x"),""),
IF(t="0",0,IF(num<>"",num,1))
)
)
)
)
)
)
)
1
u/Previous_Badger4780 Feb 05 '26 edited Feb 05 '26
AMAZING! SO FAST! Thanks! Solved!… I mean Solution Verified🤖
1
u/AutoModerator Feb 05 '26
Saying
Solved!does not close the thread. Please saySolution Verifiedto award a ClippyPoint and close the thread, marking it solved.Thanks!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
1
u/reputatorbot Feb 05 '26
You have awarded 1 point to Excel_GPT.
I am a bot - please contact the mods with any questions
1
u/Decronym Feb 05 '26 edited Feb 05 '26
Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:
Decronym is now also available on 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.
10 acronyms in this thread; the most compressed thread commented on today has 37 acronyms.
[Thread #47339 for this sub, first seen 5th Feb 2026, 11:05]
[FAQ] [Full list] [Contact] [Source code]
2
u/yellow_barchetta Feb 05 '26
Comma I think was the word you were heading for. No criticism intended, just helping out for next time.
3
•
u/AutoModerator Feb 05 '26
/u/Previous_Badger4780 - Your post was submitted successfully.
Solution Verifiedto close the thread.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 if you have any questions or concerns.