If cell contains value, subtract from multiple cells

PreppieCrown

New Member
Joined
Mar 7, 2019
Messages
1
Hi guys,

I'm relatively new to Excel and need to use it for a uni assignment. Basically, I'm testing out the economy of a cafe simulator game, checking to see if the values of ingredients are appropriate for players to complete a level.

The orders that arrive are randomly generated, and I have that set up. The numbers generated correlate to a customer order. For eg: 1 = Bacon and Eggs.

What I want to do is to check if the cell either says "1", "2", or "3" and take away a quantity. For example, if 1 has been randomly generated, take away 2 from two seperate cells that correlate to an ingredients list.
So:
The customer has ordered Bacon and Eggs (1) and I need to take away 2 Bacon and 2 Eggs from ingredients.

I'm also not entirely sure on where to put the formula or potential formulas for it to work effectively.

I've tried the If formula, and Countif and none of them seem to do what I want, I could just be doing it entirely wrong though.
 

Some videos you may like

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Watch MrExcel Video

Forum statistics

Threads
1,109,205
Messages
5,527,399
Members
409,760
Latest member
zeeshansyed

This Week's Hot Topics

Top