just would like to compare cell entries and return values.
coustmer_NO id A1 A2 A3 A4
1 5 10 20 45 0
1 13 0 45 2 5
2 4 0 10 7 8
2 3 7 9 55 0
2 10 0 0 0 0
3 4 90 8 14 3
3 10 20 7 4 15
how to count the ID that has (value > 030) for each customer_no
then, the min number of values before 030 appears.
The expected output would be something like:
cosutmer_no , count_ac_num , values
1 2 1
2 1 1
3 1 3
I would recommend converting to a more vertical structure. Then you can begin trying to apply your business logic, although I am having a hard time understanding what that is.
Assuming that the quotes are not meaningful (looks like someone had a string like
"xxx"
that had actual quote characters in it that was written to a CSV file and so extra quotes where added to protect the existing quotes so it became"""xxx"""
) you could just usecompress()
function to remove them.You could then just split the resulting string into 3 character substrings.
So you end up with something like this: