If a field is not blank, choose a number between 2 other fields
Hello, again.
Firstly my big spreadsheet was a 'running log', then it was the 'walking log' and now is my 'running and walking log'.
I asked for help before and the members "Recycleur" and "Badunit" were generous in helping me, but for reason that I could not figure out, I could not make the solution of "Recycleur" work in its second phase; while the solution of "Badunit" answered my question at the time.
Recycleur's help gave me a thing that I did not ask for, but that I want to keep it ... in an extra column.
Recycleur's help created 2 extra columns, later reorganized.
(i) With the header 'Run', the cells of the 'P column' were formed by the formula: "IF(COUNTMATCHES($D3,P$1)>0,COUNTMATCHES(TEXTJOIN(",",TRUE,OFFSET($D$1,1,0,ROW()−1,1)),P$1),"")".
(ii) With the header 'Hike', the cells of the 'Q column' were formed by the formula: "IF(COUNTMATCHES($D3,Q$1)>0,COUNTMATCHES(TEXTJOIN(",",TRUE,OFFSET($D$1,1,0,ROW()−1,1)),Q$1),"")"
What each of these columns show are the cardinal numbers -- acting as ordinal numbers -- of the 'Run' and of the 'Hike'; so, I would like to have these cardinal/ordinal numbers in the 'C column', since in the 'D column' I have the field 'Activity', and each of the rows have 2 options "Run" or "Hike"; the 'G column' has the 'Date/Time' of the activity.
So the algorithm should do these steps;
"if 'G' is blank, 'C' should obviously be empty";
"if 'G' has a 'Date/Time', then it means that an 'Activity' was registered; so there is an cardinal/ordinal number either in the 'P column' or in the 'Q column'; and this number should be copied into the 'C column'.
If I was doing this on ClarisWorks/AppleWorks I would use the 'or function' and the result would be shown very easily.
But Numbers is harder on the syntax, and I could get only the cardinal/ordinal number of only one of those 2 activities; where I should get the cardinal/ordinal number of the other activity, I got a red air a blue triangle -- depending on the variation of the formula used.
Thanks in advance for any help.
Jorge Lucas (the guy from Rio Grande do Sul)
MacBook Air 13″