#1
|
|||
|
|||
Combine Indirect and If formula?
I have a simple inventory spreadsheet for my locations to enter inventories on. I'm using a simple IF formula to present to them a number for reorder if the inventory is below the par value for that item, and present them a blank cell if the inventory is at or above par.
Currently, employees have to update the formula when they insert a row to enter the new inventory. I need the employees to be able to insert a line above the last inventory taken (above row 11 in the image) and for the formula to "stick" with the row (11) instead of updating to the row below the insertion (where it was originally referencing). Every time I insert, the formula updates to row 12. I've tried absolutes, but that does not help - it still updates to row 12. I've read online that you can use indirect to achieve this, but every time I try to combine If and Indirect formula, I get an #REF! error. I don't have any experience with Indirect. Any help would be appreciated! |
#2
|
|||
|
|||
If I understand what you want:
=IF(INDIRECT("P7")-INDIRECT("P11")<1,"",INDIRECT("P7")-INDIRECT("P11")) or better =if(INDEX(P:P,7)-INDEX(P:P,11)<1;"",INDEX(P:P,7)-INDEX(P:P,11) Better because INDEX contrary to INDIRECT is non-volatile. Volatile functions may make Excel slow if you work with large models. Last edited by xor; 04-15-2017 at 11:40 PM. |
#3
|
|||
|
|||
That's the ticket, xor! They both work perfectly! (Excel said there was an error in the index formula and corrected - I think it was the semicolon.)
I'll take your advise and use the second just in case. Thank you so much! |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Indirect with hlookup | jamesjts | Excel | 3 | 01-05-2016 09:13 AM |
Indirect AND OR Formula Help | del_piero_3 | Excel | 3 | 09-18-2015 02:58 PM |
Indirect Reference? | tinfanide | Excel | 2 | 08-28-2015 05:11 PM |
Indirect Formula with dynamic rows | bluionz | Excel | 1 | 03-13-2014 11:00 AM |
Indirect | zleyphox | Excel | 1 | 02-11-2010 09:57 AM |