Sep 01, 2020 11:15 AM
Hey guys im really dumb in Excel, I need some help.
First column is the item, then next one I have records for each, that is the stock. I’m struggling for an hour to find a formula which COUNTS how many rows are there, therefore I have the exact numbers of the rows, which is the stock for each item.
Thanks!
Solved! Go to Solution.
Sep 01, 2020 02:08 PM
Its still not working :frowning: but thank you very much.
Also I checked that guide, but I still dont really get it. It seems too complicated. I would like to work on one table only. I think you understood what I was trying to do.
Sep 01, 2020 03:13 PM
To count the number of lines in your long text field, you can use this formula:
LEN({Field Name})-LEN(SUBSTITUTE({Field Name},"\n",""))+1
Sep 01, 2020 03:57 PM
Don’t forget to wrap your formula in an IF
statement, or your formula will say that blank records have 1 line.
IF({Field Name},
LEN({Field Name})-LEN(SUBSTITUTE({Field Name},"\n",""))+1
)
Sep 02, 2020 07:59 AM
Doesn’t work :frowning: what should I put in field name, based on my example above?
Sep 02, 2020 08:13 AM
Does Scott’s original formula work for you? If it doesn’t, my formula won’t work either.
I was simply wrapping Scott’s formula in an if function.
Sep 02, 2020 08:34 AM
doesnt really work :frowning: what should I put in field name
Sep 02, 2020 08:35 AM
@Tamas_Puskas You have to put in the actual name of your field. What is the name of your field? Is it STOCK_? If it’s STOCK_, then you have to put in STOCK_.
Sep 02, 2020 09:13 AM
Ohh nice, thank you so much!!! It works now. Only gotta take care of not pressing enter after last record, because that counts as one too
Sep 02, 2020 09:33 AM
This is how more complex formulas get built.
This version will ignore if you press enter after the last line.
IF({Field Name},
LEN(TRIM({Field Name}))-LEN(SUBSTITUTE(TRIM({Field Name}),"\n",""))+1
)
Sep 02, 2020 01:53 PM
WOW , thank you so much. This really made my life easier :grinning_face_with_big_eyes: thank you so much