How make an excel cell take a value from another sheet if there's content -
How make an excel cell take a value from another sheet if there's content -
i using excel track order of kit beingness purchase sports club. have 2 sheets within 1 document, 1 orders , costs of each item.
i cost column automatically work out total cost of items.
i think need assign each of 4 columns value based on sec sheet (so link them?) , tell costs column if there value in rows add together them together.
this more has been covered many time, i'm bit new excel formulae , if has suggestions welcome.
i assuming a1 on sheet1 jacket. assuming potential values single size, , there not case there were, example, 2 shirts on 1 order.
if format (items, costs) static, should work fine in f2, fill formula down.
=sum(if(isblank(a2), 0, sheet2!$b$2), if(isblank(b2), 0, sheet2!$b$3), if(isblank(c2), 0, sheet2!$b$4), if(isblank(d2), 0, sheet2!$b$5))
explanation: sum formula adds bunch of numbers. in our case, each of numbers checking if cell blank. if cell blank uses 0 number. if cell isn't blank, looks cost on sheet2. $
protects values beingness modified when fill downwards sequence.
limitations:
if cost of item on sheet 2 ever changes, it'll alter costs on sheet1, not new orders. if ever want around this, can "lock in" values copying cells in cost column current orders, doing paste values.
if insert new column on sheet1 anywhere before shorts, or new row on sheet2 anywhere before shorts, it'll break logic , cost totals wrong. if ever need add together new cost item, create sure add together end, , add together new if(isblank())
formula.
alternate view of same formula clarity:
=sum( if(isblank(a2), 0, sheet2!$b$2), if(isblank(b2), 0, sheet2!$b$3), if(isblank(c2), 0, sheet2!$b$4), if(isblank(d2), 0, sheet2!$b$5))
excel excel-formula formulas
Comments
Post a Comment