# Using a lookup to give volume result

**URL:** <https://discourse.nodered.org/t/using-a-lookup-to-give-volume-result/14841>\
**Category:** General\
**Created:** [27 August 2019 23:21 UTC](https://discourse.nodered.org/t/using-a-lookup-to-give-volume-result/14841 "2019-08-27T23:21:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andysev](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@Andysev](https://discourse.nodered.org/u/Andysev)\
**Post date:** [27 August 2019 23:21 UTC](https://discourse.nodered.org/t/using-a-lookup-to-give-volume-result/14841/1 "2019-08-27T23:21:10Z")

</div>

Hi Everyone, first time poster, so hopefully I get this correct.  
I'm receiving a measurement from an ultrasonic sensor or a pressure Transducer. This level will indicate the height of liquid in a vessel. I have formulas in a function node to create a volume from this level based on radius, height etc....but I also have some vessels (earth dams) that are irregular in shape. I can access surveyed data that show a volume for each cm of height. This is in a spreadsheet or table.  
Could someone advise the best approach to add or "lookup" this data to pass a volume?  
I'm a very novice user, so the simpler the better! Thanks in advance.

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [28 August 2019 06:43 UTC](https://discourse.nodered.org/t/using-a-lookup-to-give-volume-result/14841/2 "2019-08-28T06:43:17Z")

</div>

You don’t say how large you spreadsheet or table is.

But one way to do it would be to store it in you function as an array or store it as a context variable containing an array.

Or load it into a sqlite database and query it from there

---

<div class="post-metadata">

**Author:** ![Andysev](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@Andysev](https://discourse.nodered.org/u/Andysev)\
**Post date:** [28 August 2019 22:10 UTC](https://discourse.nodered.org/t/using-a-lookup-to-give-volume-result/14841/3 "2019-08-28T22:10:59Z")

</div>

Thanks ukmoose, the table or spreadsheet could potentially get as large as 700 rows, although this would be a bit unusual. I would need to cater for that though. Too many to manually type!  
I'll do more reading, if you have any simple references to anything you think would help, that would be appreciated.  
Thanks for you time.
