Forum Discussion
herryfall
Jan 08, 2025Copper Contributor
excel help request
Hello, I want to associate several unit names from a game I play (hammers) for example, written in a box with a specific value (30) in order to calculate how many units I can use simultaneously. Could you help me please?
- NikolinoDEGold Contributor
Based on your description, you want to associate specific unit names (like "hammers") with certain values (like 30) and then calculate how many units can be used simultaneously. I'll walk you through how to set this up in Excel.
Step-by-Step Solution:
Let’s break this into two main parts:
1. Mapping unit names to specific values.
2. Calculating how many units can be used simultaneously based on available resources or conditions.
Step 1: Map Unit Names to Values
Let’s assume you have a list of units and corresponding values, like this:
A B
Unit Name Value
Hammer 30
Sword 50
Shield 40
In this case, each unit name ("Hammer", "Sword", etc.) has an associated value (e.g., 30, 50, 40).
Step 2: Set up the Calculation for Simultaneous Units
You can calculate how many units you can use simultaneously based on the available resource. For example, if you have 300 points to spend on units, you want to know how many "Hammers" you can use simultaneously.
Let's set up the calculation:
1. In column A, you list the unit names (like "Hammer").
2. In column B, you input the corresponding values for each unit (e.g., 30 for Hammer).
3. In column C, you can enter the available resource (e.g., 300).
4. In column D, you will calculate how many units you can use based on the available resource.
Example:
Let’s say the available resource is in C2 (300 points). You can calculate the number of units you can use by dividing the available resource by the unit value (in B2).
Here’s the formula for D2 to calculate the number of "Hammers" you can use:
=INT(C2/B2)
This formula divides the available resource by the unit value and rounds down to the nearest whole number, giving you the number of units you can use. (For example, 300 points divided by 30 for a Hammer means you can use 10 Hammers).
Example Data Setup:
A B C D
Unit Name Value Available Resource Units You Can Use
Hammer 30 300 =INT(C2/B2) → 10
Sword 50 300 =INT(C2/B3) → 6
Shield 40 300 =INT(C2/B4) → 7
Step 3: Additional Tips
• Variable Available Resource: If you change the available resource in C2, the number of units you can use will automatically update in column D.
• Handling Different Unit Combinations: If you want to calculate how many units you can use in total (e.g., 10 Hammers and 5 Swords), you can sum the results of each unit column, depending on your use case.
Since no one has answered yet...The text, steps and the formula were created with the help of AI.My answers are voluntary and without guarantee!
Hope this will help you.