Forum Discussion
Return values from a Range
Hello there.
Help needed please.
If I have a range number of parts to stock (Column A and Column B), I would like to calculate the number of hours for maintenance and Initial Setup Time. Example if the number of parts to stock is 15 (Cell F2), I would like a formula that would return 0.2 (F7) for the maintenance hours from Column C and 5.0 G7) for the Initial Setup Time from Column D. And if number of parts is above 100, then to return 1.5 and 28.0.
Any assistance is appreciated and thank you in advance.
5 Replies
- VFernandesCopper Contributor
Hi Hans.
Thank you very much for your assistance.
I have tried your suggestion but somehow it is not working. Any thoughts please?
My apologies - it was a typo. The ranges should be the same size.
=XLOOKUP(F2, A3:A13, C3:D13, "", -1)
- VFernandesCopper Contributor
Excellent, it works.
Apologies I also missed the typo.
Thank you very much for your quick and excellent support, much appreciated.
The values in column A and B are currently text values. Convert them to numbers, and change A13 to the number 101.
In F7:
=XLOOKUP(F2, A3:A13, C2:D13, "", -1)
This will spill to F7:G7.
- VFernandesCopper Contributor
Hi Hans,
Thank you very much for your assistance.
I have tried using your suggestion but somehow it is not working. Any thoughts please.