Document Blankwed
Document Blankwed
I’ll go over basic arithmetic, data manipulation, conditional logic, and text
formatting formulas in spreadsheets, providing detailed explanations and examples.
Though I can't directly create diagrams here, I’ll explain in a way that you can easily
follow along in your spreadsheet application like Excel or Google Sheets.
---
a) Addition
Formula: =A1 + B1
Example: If cell A1 contains 10 and cell B1 contains 15, =A1 + B1 will return 25.
b) Subtraction
Formula: =A1 - B1
c) Multiplication
Formula: =A1 * B1
d) Division
Formula: =A1 / B1
e) Sum Function
Formula: =SUM(A1:A5)
---
2. Data Manipulation Formulas
These formulas help to work with and manipulate data in different ways.
Example: If A1 contains John and B1 contains Doe, =CONCAT(A1, " ", B1) will
return John Doe. Here, " " adds a space between the two strings.
b) VLOOKUP
A B
Product Price
Apple 2
Banana 1
Orange 3
Example: Same product table as above, but we use INDEX and MATCH together to
achieve the same result as VLOOKUP. =INDEX(B1:B3, MATCH("Banana", A1:A3,
0)) will return 1 (Banana’s price).
---
3. Conditional Logic
a) IF Function
b) Nested IF
Formula: =IF(A1 > 90, "A", IF(A1 > 80, "B", "C"))
Example: If A1 is 95, the formula will return A. If it’s 85, it will return B, and
anything else will return C.
c) AND/OR Functions
Formula (AND): =IF(AND(A1 > 10, B1 > 10), "Both are High", "One or Both are
Low")
Example: If A1 and B1 are both greater than 10, it will return Both are High,
otherwise One or Both are Low.
Formula (OR): =IF(OR(A1 > 10, B1 > 10), "At least one is High", "Both are Low")
Example: If either A1 or B1 is greater than 10, it will return At least one is High.
---
Formula: =UPPER(A1)
Formula: =LOWER(A1)
Formula: =PROPER(A1)
c) LEN
Formula: =LEN(A1)
d) TRIM
Formula: =TRIM(A1)
Example: If A1 contains Hello (with spaces), =TRIM(A1) will return Hello (removes
extra spaces).
---
Summary Table:
---
You can practice each of these formulas in your spreadsheet to see them in action!
Would you like more details on any specific area or examples with actual data?
Great! Let’s dive deeper into specific examples with actual data. I’ll use examples to
illustrate the formulas, so you can directly copy them into your spreadsheet and see
how they work.
---
Formula: =A2 + A3 + A4 + A5
Example: To calculate the total quantity of all items, input =A2 + A3 + A4 + A5. This
will return 53.
Formula: =A2 * B2
Example: For each item, you can calculate the revenue (Quantity × Price) by using
=A2 * B2. The result will be 50 for the first row (10 × 5).
Formula: =SUM(A2:A5)
Example: To sum all quantities from A2 to A5, use =SUM(A2:A5) which will return
53.
---
Example: Use =CONCAT(A2, " ", B2) to combine the first and last names in row 2.
This will return John Smith.
Example: This formula searches for Banana in the table and returns its corresponding
price from column B. The result will be 1.
c) INDEX and MATCH: Alternative to VLOOKUP
Example: This will return 3, the price of Orange. The MATCH function finds the
position of "Orange" in column A, and INDEX uses that position to get the
corresponding price from column B.
---
a) IF Function: Pass/Fail
Example: This formula checks whether the score in A2 is greater than or equal to 80.
If true, it returns "Pass"; otherwise, "Fail". For a score of 92, the result will be Pass.
Formula: =IF(A2 >= 90, "A", IF(A2 >= 80, "B", IF(A2 >= 70, "C", "D")))
Example: For a score of 92, it will return A. For a score of 85, it will return B, and so
on.
Example: This formula checks if the score is 80 or higher and the result is "Pass". If
both are true, it returns "Good"; otherwise, "Needs Improvement".
---
b) LEFT/RIGHT/MID Functions
MID: =MID(A2, 3, 4) returns 4 characters starting from the 3rd character of the text
in A2.
---
You can visualize the flow of formulas with the following diagram examples in your
head or on paper:
INDEX/MATCH works in two steps: first, MATCH finds the position of the item,
and then INDEX retrieves the corresponding value.
If you use Nested IFs, you continue adding branches for each possible outcome (e.g.,
grades A, B, C).
3. AND/OR Logic:
Picture a gate that only opens if both (AND) conditions are met, or if one or more
(OR) conditions are met.
---
Practical Usage
To practice:
3. Experiment with changing the data to see how the formulas adapt.
For instance, try changing the prices or quantities in the multiplication formulas, or
adjust the scores for the IF functions to test different outcomes.
---
Let me know if you would like more examples or further clarification on any of these
formulas!