ABS formula not able to accept an Array
Hi Community,
The goal is to find if the time of day and reported shark numbers "No#" (in the Coral Bay WA Aus shark sanctuary) which coincide with the tide condition.
The key issues I have is there isn't always the same number of tides per day, so using a variable array via my indirect DateRow# and EndDateRow# is how I have tried to addressed this, but the array isn't possible within an ABS formula (as I have to find the closet tide +/- of the reported time (Table 1)).
- I don't believe adding a helper column will work in this case as the tide actual time (Table 2::C) would have to be compared to every actual time (Table 1::B) which isn't possible to have that many helper rows (maybe I'm missing something :) ).
The rest of the formula is to allow me to identify if it's an Incoming or Outgoing High/Low etc tide.
- I'm open for ideas for improvements but it's secondary to the above issue.
If anyone has some ideas or a totally different approach I would love to hear it.
The ABS part of the formula which is currently in Table 1::G2, always returns the first result as the array doesn't work. The formula used is below
MIN(ABS(C2−INDIRECT("Table 2::$D"&$E2&":$D"&$F2,addr-style)))
The full formula which is very, very long (sorry but just incase it helps) is.
=IF(XLOOKUP(INDEX(INDIRECT("Table 2::$D"&$E2&":$D"&$F2,addr-style),MATCH(MIN(ABS(C2−INDIRECT("Table 2::$D"&$E2&":$D"&$F2,addr-style))),ABS(C2−INDIRECT("Table 2::$D"&$E2&":$D"&$F2,addr-style)),1),column-index,area-index),INDIRECT("Table 2::$D"&$E2&":$D"&$F2,addr-style),Table 2::B2:B9,if-not-found,0,1)="HIGH",IF(C2−MIN(INDIRECT("Table 2::$D"&$E2&":$D"&$F2,addr-style))>Table 3::C2,Table 3::$A8,IF(C2−MIN(INDIRECT("Table 2::$D"&$E2&":$D"&$F2,addr-style))>Table 3::E2,Table 3::$A2,IF(C2−MIN(INDIRECT("Table 2::$D"&$E2&":$D"&$F2,addr-style))>0,Table 3::$A6,IF(C2−MIN(INDIRECT("Table 2::$D"&$E2&":$D"&$F2,addr-style))<Table 3::E3,Table 3::$A8,IF(C2−MIN(INDIRECT("Table 2::$D"&$E2&":$D"&$F2,addr-style))<Table 3::C3,Table 3::$A3,IF(C2−MIN(INDIRECT("Table 2::$D"&$E2&":$D"&$F2,addr-style))<0,Table 3::$A6,if-false)))))),IF(C2−MIN(INDIRECT("Table 2::$D"&$E2&":$D"&$F2,addr-style))>Table 3::C4,Table 3::$A8,IF(C2−MIN(INDIRECT("Table 2::$D"&$E2&":$D"&$F2,addr-style))>Table 3::E4,Table 3::$A4,IF(C2−MIN(INDIRECT("Table 2::$D"&$E2&":$D"&$F2,addr-style))>0,Table 3::$A7,IF(C2−MIN(INDIRECT("Table 2::$D"&$E2&":$D"&$F2,addr-style))<Table 3::C5,Table 3::$A7,IF(C2−MIN(INDIRECT("Table 2::$D"&$E2&":$D"&$F2,addr-style))<Table 3::E5,Table 3::$A5,IF(C2−MIN(INDIRECT("Table 2::$D"&$E2&":$D"&$F2,addr-style))<Table 3::E5,Table 3::$A8,"Issue with formula")))))))
Very much looking forward to any possible ideas on how to address this issue,
Thanks,
Stuart.
MacBook Air, macOS 14.6