I have a spreadsheet with values from a drainage program (pipes and pits) and I want to create a formula that will find the Pit name and then find the minimum value in the downstream end of the pipe that connects to that pit.
That I can do with an array - {=MIN(IF('ArcGIS Pipes'!$C$2:$C$100=A3,'ArcGIS Pipes'!$F$2:$F$100))}. However, sometimes the pit only connects to the upstream end which means it's in a different column under 'upstream end'. If that's the case then I want that value, but at the moment I'm having to first run the 'downstream' formula, if that returns nothing then I have to manually change the 'null' cells to {=MIN(IF('ArcGIS Pipes'!$B$2:$B$100=A2,'ArcGIS Pipes'!$E$2:$E$100))}. Once I've done that any leftover 'null' values are pits which don't connect to any pipes and they're manually given a null value.
So, what I want to do is have the one formula that does all of the above for me without me having to go through and fiddle things. In short I want the formula to first check for a minumum downstream value in one column, if that returns nothing then I want it to check for the minimum upstream value in another column, finally if that returns nothing then I want a null value returned.
I've fiddled around with nested IFs and sub arrays but just get an error or a 'FALSE' returned. The formula I've tried that gives me 'FALSE' is =IF((MIN(IF('ArcGIS Pipes'!$C$2:$C$100=A2,'ArcGIS Pipes'!$F$2:$F$100))),IF(MIN(IF('ArcGIS Pipes'!$B$2:$B$100=A2,'ArcGIS Pipes'!$E$2:$E$100)),null)). I know I'm missing something but I'm starting to go around in circles!
Thanks
Aucun commentaire:
Enregistrer un commentaire