Ravindra BagaleCourses & study guides मराठी Track your progress

3. Formulas and Functions

Excel

3.1 Formula Basics and Operators

Turn a price rule into a calculation

A fictional Blinkit-inspired order sheet lists a carton of dairy products for ₹64. A teammate offers a practice discount of ten percent and needs the new amount. Use a formula so the adjusted price changes when the original price or discount changes. The example uses made-up prices and policies. It makes no claim about an actual company's billing rules.

Imagine three people working through this order. One uses a calculator and types 57.60 into a spreadsheet. Another writes an expression with the original amount and discount as literal numbers. A third places the amount and discount in two input cells and uses their addresses. All three can show the same answer today. The version using addresses lets your teammate change just the input they were asked about and check the new result without rewriting the calculation.

Three parts of the input-and-result design

  1. Original amount. Store 64 in an Amount cell. Show it as rupees if helpful. The stored value can remain numeric regardless of how you display it.
  2. Discount rate. Store 10% in another cell. A percentage describes a share of one. Ten percent represents the numeric value 0.1. One represents the full amount in the retained-share calculation.
  3. Calculated result. Start a formula in a third cell with an equals sign. Refer to both input cells. That third cell is the place where the reader sees the resulting amount.

An address such as C2 tells Excel to use the value at the intersection of column C and row 2. In this lesson, C2 is the original amount, D2 is the discount and E2 is the adjusted amount. Enter =C2*(1-D2) in E2. Excel subtracts ten percent from one, giving 0.9. Then it multiplies 64 by that retained share, giving 57.60 rupees.

Gross amount C2 is 64 rupees. In parentheses, 1 minus 10 percent equals 0.9. Multiply 64 by 0.9 to get 57.60 rupees.
Work out the share of the amount that remains. Then apply that share to the original rupee value.

Read the expression from the formula bar

When you select an ordinary calculation cell, you see a result on the sheet and its expression in the formula bar. For example, E2 may show ₹57.60 while the formula bar shows the expression involving C2 and D2. A cell that contains a typed number can look identical from a distance. Select it before you assume it recalculates from anywhere else.

  • The leading equals sign. This is the standard signal for entering a formula in Excel. The equals sign can also appear later inside an expression as a comparison. In =C2=64, the first one starts the formula and the second one asks whether C2 equals 64.
  • An operand. This means a value used by an operation. In =C2*0.9, the value from C2 and the number 0.9 are the operands. You can read each separately before multiplying them.
  • An operator. This is the symbol for an action or test. The star multiplies. The forward slash divides. The ampersand joins text. Angle brackets and equals signs can compare results.
  • A literal value. A literal is written directly into the expression, such as the one in the discount formula. That one is useful because it represents a whole share and has the same meaning across every row. A percentage that a manager might change later belongs in an input cell so it can be reviewed and changed easily.
  • A reference. A cell or range address asks Excel to read values from the sheet. C2:C5 includes C2, C3, C4 and C5. Excel can update dependent formulas after an input cell changes if automatic recalculation is enabled.

A standard operation in a function

For two numbers, =C2+C3 works as a direct addition. To add four amounts, type =SUM(C2:C5). SUM is the function name, and the expression in its parentheses supplies the function's argument. In documentation, examples sometimes show optional arguments in square brackets. That notation explains what can be left out. You do not type those brackets when you supply the optional value in an ordinary function call.

As you type a function name in an Excel client that supports Formula AutoComplete, look for its name and argument hints. When an expression spans multiple cells or functions, build it in small parts while learning. Try a plain sum with known inputs first. Then add the next operation after you have checked the sub-result. Argument separators depend on regional settings. Examples use commas. If your client expects another separator, use the one indicated by the function hint.

Predict which operation happens first

Excel follows rules about which operations are evaluated first. This ordering is called precedence. Parentheses also let you group a part of the expression. A reader should be able to tell which calculation you intended to finish before moving to the next. The purpose of grouping is visible when two expressions use the same numbers and give different results.

Type each in a separate spare cell and predict its value first.
ExpressionResultReason
=2+3*414Find three times four, then add two.
=(2+3)*420Find the sum in parentheses, then multiply it by four.
=36/6*212Division and multiplication share priority. At this level, evaluate them from the left.
=36/(6*2)3First form the product of six and two. It is the whole divisor.
=2^38The caret raises two to the third power.
=(-2)^24Square the negative number as a group.
=-(2^2)-4Apply the negative sign to the already squared result.

For the arithmetic in this lesson, multiplication and division take priority over addition and subtraction. Exponentiation, percent signs and unary negation have specific positions in Excel's full order. Unary negation means putting a minus sign in front of one operand to change its sign. Subtraction uses two operands. Use explicit grouping when powers and negative signs occur together rather than relying on a rule from a different tool. The parentheses clarify which quantity the power applies to.

Recover from a missing pair of parentheses

In the order example, typing =C2*1-D2 gives 63.90 when the inputs are 64 and 10%. Excel first computes 64 times one, and then subtracts 0.10 from it. It subtracted a decimal number of rupees rather than ten percent of the amount. The result is close to 64, which makes it plausible if you only glance at the sheet.

There are two straightforward ways of expressing the intended rule. The retained-share formula =C2*(1-D2) multiplies the original amount by ninety percent. The explicit decrease =C2-C2*D2 subtracts the actual rupee reduction. Ten percent of 64 is 6.40, and 64 minus 6.40 also gives 57.60. Use the second calculation as your independent check in Lab 1.

Use the right symbol for the kind of result

A spreadsheet contains several kinds of values. You can add rupee amounts, join two text labels, and compare a price with a threshold. The right formula gives a result whose type matches what you need to do next.

Arithmetic for an amount or rate

Use plus to combine amounts, minus to find a difference, star for multiplication and slash for division. If two packs together cost ₹64, division by the quantity gives ₹32 per pack at the original price. If the discounted net is ₹57.60, division by the same quantity gives ₹28.80 net per pack. Write the column heading so readers can tell which amount you divided.

Comparisons for a decision

Enter =E2>100 when you want to know whether the net amount exceeds ₹100. Excel returns TRUE or FALSE, which are logical values. In the row at ₹57.60 the result is FALSE. Use greater than or equal to if the boundary itself qualifies. At exactly ₹100, “above ₹100” is false and “at least ₹100” is true. Excel also uses <> for “does not equal.” A comparison can later become the first input to IF, where you decide what words or values to return for each result.

Concatenation for one label

Concatenation means connecting pieces of text. If A2 contains BLK-1001 and a separate city cell J2 contains Pune, use =A2&" / "&J2 to produce BLK-1001 / Pune. The text between quotation marks contains the visible separator and its surrounding spaces. This result helps a person identify an order. An amount multiplied by a rate belongs in a numeric column. Keep the display label separate so later calculations can still use the amount as a number.

Unit labels help interpret arithmetic

In a fictional Instagram creator report, ten recorded link taps divided by two hundred impressions yields 0.05, which can display as 5%. The denominator is impressions, so the output means taps per impression under the example's definition. If a teammate instead divides by fifty profile visits, the same numerator gives 20%. The distinction comes from what was counted in the denominator. Say which business question the formula is answering before comparing rates.

Copy a formula without moving the shared input

When copying a formula down to another row, Excel adjusts relative references. Start with =C2*(1-D2) in E2. In E3 the equivalent expression is =C3*(1-D3). It asks for the amount and discount on the new row. Excel applies the same rule to different values. You can test this by selecting both result cells in turn and reading their formula bars.

The formula in E2 uses inputs C2 and D2 for 57.60 rupees. The filled formula in E3 uses C3 and D3 for 243 rupees.
Fill down the rule. Inspect the changed source addresses in the copied formula.

You can design a different rule where every order uses an identical scenario discount. Put 5% in K2 and use =C2*(1-$K$2). The dollar signs fix both the column and row in the second address. Filling down moves C2 to C3, while K2 stays fixed. If you copy an unsecured K2 reference down, the next formula would use K3. An unused input can then be treated like zero in this calculation, making the result look plausible even though it missed the shared setting.

  • Use a relative address for an input that should travel with each order. The row is part of what makes the order different.
  • Use an absolute reference or an appropriate defined name for an assumption stored in one location. Keep a visible label next to the assumption so a reviewer can find it.
  • Verify after filling more than one row. The first row of a badly anchored formula may be correct by accident. A second row that uses a different stored amount proves that the result follows the intended source.

Mixed references pin only one direction and are useful when your formula is copied both across and down. Here you only need one decision about where the input lives, so the fully relative and fully fixed examples are easier to audit. Revisit relative, absolute and mixed references before building a larger grid.

Lab 1 · Build before-and-after order prices

Use a new practice worksheet named Prices. The four orders below are a small excerpt inspired by the chapter's practice data, with fictional discounts added for this exercise. The layout here is different from the overview sheet, so enter the headings exactly as shown. That lets your formula and your addresses agree.

Enter A through D, then calculate E and F. The expected values help you check the expressions.
RowA OrderB QtyC AmountD DiscountE NetF Net per unit
2BLK-100126410%57.6028.80
3BLK-1002327010%243.0081.00
4AMN-100311105%104.50104.50
5BLK-100651500%150.0030.00

Build the row calculations

  1. Enter the amounts and quantities as numbers. In the discount column include the percent sign as shown so you enter the correct fraction. For this lab a zero discount is an explicit valid input.
  2. In E2 use =C2*(1-D2), and in F2 use =E2/B2. Test both on row 2. The second formula uses the result of the first formula. This is a dependency because one result reads another cell's value.
  3. Fill both down through row 5. Inspect one formula near the end. If E5 reads the 150 and 0% from row 5, it should return 150. The net per unit then divides that amount by five.
  4. Type Net over ₹100 in G1 and use =E2>100 in G2. Fill it down. Row 2 is FALSE. Rows 3, 4 and 5 are TRUE. Under the net heading, row 4's 104.50 clears the boundary by a small amount. This makes it a useful test if someone changes its discount.
  5. Use =SUM(C2:C5) and =SUM(E2:E5) outside the data. The totals are ₹594 and ₹555.10. Their difference is ₹38.90. The sum of the individual discounts, 6.40 plus 27 plus 5.50 plus zero, gives the same reduction.

Change one input and track dependent cells

  1. On row 4, temporarily change the discount to 10%. Net becomes ₹99 and net per unit becomes ₹99 because the order has one item. The logical comparison now reads FALSE. The overall net becomes ₹549.60, which is ₹5.50 lower.
  2. Restore the original 5% on row 4. A return to ₹555.10 and TRUE on row 4 makes a good check that each result is driven by the intended cell.
  3. As a separate test, enter =C2-C2*D2 in a spare cell. Both methods should give ₹57.60 for row 2. If the original gives ₹63.90, inspect the parentheses and the role of the multiplying amount.

Lab 2 · Compose a bill in small checked steps

Imagine a hotel manager reviewing a fictional booking displayed in a travel marketplace such as Booking.com. You will build a worksheet that can answer a question about a two-night booking. The dates, charges, discount and percentage are fictional. In this exercise the tax applies only to the discounted room charge, and the extras are added at face value afterward. These rules are for formula practice.

Write the calculation order next to the inputs

Make a worksheet named Booking. In row 1, label A through F Room, Nights, Rate per night, Room discount, Extras, and Practice tax. Enter Room 202, two nights, 1,200 rupees per night, 10%, extras of 150 rupees, and 18% in row 2. Type the currency inputs as 1200 and 150. Leave room for four calculated cells in G through J.

  1. G2 · Room gross. Enter =B2*C2. Two nights times ₹1,200 per night gives a room gross of ₹2,400. This combines quantity and rate before either percentage is applied.
  2. H2 · Discounted room. Enter =G2*(1-D2). The ninety percent retained share gives ₹2,160. You can check that the difference is ₹240, which is one tenth of gross.
  3. I2 · Practice tax. Enter =H2*F2. The tax base for this lab is the discounted room of ₹2,160. Eighteen hundredths of it is ₹388.80.
  4. J2 · Total. Enter =H2+I2+E2. The discounted room plus its tax gives ₹2,548.80. The extras add ₹150, giving a final amount of ₹2,698.80.

Now make the same calculation in one spare cell using =B2*C2*(1-D2)*(1+F2)+E2. The group (1+F2) represents the discounted room plus its tax, or 118% of the discounted room. Extras are outside this multiplication. The result should agree with J2 for these inputs. Using helper cells often makes the policy easier to inspect. A helper cell is a separate cell that returns one intermediate value.

Watch the amount change at each step

  1. Multiply nights by the nightly rate

    Two times ₹1,200 gives the room gross of ₹2,400. Extras have their own input and are outside this stage.

  2. Apply the room discount

    Take ninety percent of ₹2,400. The room charge becomes ₹2,160. You can still see the original gross in its own cell.

  3. Apply the practice tax to its base

    Apply eighteen percent to ₹2,160. The tax is ₹388.80. The next amount is ₹2,548.80 when you add it back to the discounted room.

  4. Add the extras

    Only now add ₹150. The final bill is ₹2,698.80. Changing the extras should move the final bill by the same rupee change under the lab's rule.

Prove the formula implements the stated policy

  • Temporarily change the extras to ₹200. G2, H2 and I2 should stay the same. The final amount rises by ₹50 to ₹2,748.80. That establishes that extras do not alter the tax base in this workbook.
  • Restore extras to ₹150 and change the room discount to 20%. The discounted room becomes ₹1,920 and tax becomes ₹345.60. The final amount is ₹2,415.60. Restore the original 10% after checking each value.
  • Compare the deliberately different formula =(B2*C2*(1-D2)+E2)*(1+F2). With original inputs it gives ₹2,725.80, which is ₹27 higher. That extra ₹27 equals eighteen percent of ₹150. Its parentheses brought the extras into the taxable base. If the policy changes, the correct form can change too.

Diagnose formula problems in a sensible order

A technical error is only one way a formula can fail. A perfectly calculated expression may still have the wrong priority, units, row addresses or rule. Test one piece at a time so the repair reflects the error you actually observed.

Inspect what was entered

  • Select the result and read its formula bar. If you see only 57.60 as a stored value, typing a new discount will not change it. Re-enter the intended expression. If you want a fixed report snapshot later, store it separately from the formula workbook.
  • If the sheet displays formula characters instead of the answer, check one cell and then the whole sheet. Text format or a leading apostrophe can keep one expression as text. Show Formulas can change the whole sheet's view. For an accidental Text entry, change the format to an appropriate one and re-enter the formula so Excel evaluates it.
  • If Excel rejects a formula when you confirm it, look for a missing close parenthesis, an incorrect argument separator or a curly quotation mark copied from prose. Compare with a short expression you can enter directly.

Inspect inputs and one dependency at a time

  • If net divided by quantity displays #DIV/0!, read the divisor. Zero, or an effectively empty quantity in this arithmetic, leaves the formula without a valid number of units. Repair a missing input or decide how to label it. Substituting a one would invent quantity.
  • If a dollar amount seems frozen after changing the rate, check the address of the rate and the current recalculation mode. An expression can be correctly stored yet show a previous result until recalculation takes place.
  • If the expression includes its own result address, it can create a circular reference. For example, a net formula in E2 should read C2 and D2. Making it depend on E2 itself gives Excel a result whose input asks for that same result. Put the starting amount in its own cell and fix the reference.
  • If only the copied rows fail, read the source addresses in two neighboring result cells. A shared input should stay fixed. An order-specific input should move. Check a deliberately different row to find out which behavior actually happened.

Supported desktop Excel clients offer Evaluate Formula under the formula auditing controls. It lets you inspect a calculation in intermediate steps. Menu names and availability can vary by client. You can verify the same idea manually by putting each intermediate operation in a spare cell. For the discount example, first check the retained share, then multiply by the original amount. A visible helper formula makes it easier to hand that explanation to someone else.

Practise the habits on an unfamiliar row

Give yourself a new example with simple values you can verify mentally. A fictional Swiggy-inspired group order has a base amount of ₹200 and a discount of 15%. Your expected net is ₹170. Set that up in your Prices layout without altering the earlier test rows. A larger result should prompt you to read whether the formula uses addition or subtraction when calculating the retained share.

Now set the discount to zero, then to one hundred percent, checking the net each time. For this simplified exercise, the expected results are ₹200 and ₹0. Those are edge cases because they sit at the endpoints of the allowed rate. A real pricing worksheet may impose more limits or different fee rules. The exercise uses them to check that a formula treats the full original amount and no remaining amount as you intended.

Try the opposite calculation in a spare cell. An original subscription price of ₹250 goes up by 12% in a fictional Netflix-inspired budgeting example. The new fictional price is ₹280. Use the share one plus 0.12 instead of the discount's one minus 0.12. The phrase “add ₹12” would imply a different operation and return ₹262. Write the assumption as a rate or a rupee amount so the formula can express it unambiguously.

Read the base of every percentage

Suppose a fictional Amazon seller sets aside a practice advertising allowance of 5% of an item's pre-discount price. The item is ₹200, and a customer pays ₹170 after a 15% promotional discount. Five percent of ₹200 is ₹10. Five percent of ₹170 is ₹8.50. The same percentage gives different amounts because it multiplies different bases. A spreadsheet can perform either calculation. Your task is to put the agreed base into the expression.

  1. Calculate the change amount. The shortcut is the original amount multiplied by the rate. For the example, 200 times 0.15 is thirty. This output is measured in rupees.
  2. Calculate the new amount. For a decrease, subtract the change or multiply the original by 0.85. The result is ₹170. The retained share tells you how many of the original rupees stayed in the final amount.
  3. Calculate the change rate. If you are given the old and new amounts, subtract old from new and divide by old. Here the expression =(170-200)/200 yields -0.15, which can display as -15%. If the old amount were zero, this definition of a relative rate would be undefined. Report the absolute change or ask which alternate definition the report owner wants.
  4. Recover an original amount. If the discounted amount and rate are known, divide by the retained share. Using =170/(1-15%) returns ₹200 for this example. Adding fifteen percent to 170 would produce ₹195.50, because that increase uses ₹170 as its base.

For a second boundary, consider a practice report moving from 10% to 15% on a conversion-rate column. The difference between the two displayed values is five percentage points. The relative increase with the old rate as the base is fifty percent. Near the formulas, label which measure you chose so another person does not use the number as the other kind of change.

Combine rates through their changing bases

A second discount can apply to the value left after the first one. On a ₹200 practice item, a ten-percent discount leaves ₹180. A further five percent of the new ₹180 base is ₹9. The final amount is ₹171. You can calculate both stages in one expression by multiplying the original amount by the two retained shares. The customer has paid eighty-five and a half percent of the starting amount, an overall discount of fourteen and a half percent.

Check the policy before you combine the discounts. If the second amount were five percent of the original price, the two reductions would be ₹20 and ₹10, and the final amount would be ₹170. In a workbook used by more than one person, one header can name the initial rate and one can state the second rate's base. This distinction matters even when both rules use the same figures. In a practice copy, calculate the second reduction in its own cell and confirm the value before collapsing the stages into a shorter formula.

Prepare a worksheet someone else can check

Move the inputs together so a reader can see rate, amount and quantity. Separate the calculations from the source data with headings, and give each result an address that refers back to the correct input. On the Booking sheet, anyone should be able to find the room amount and see that extras appear only after tax. On the Prices sheet, someone should see that the change to row 4 affects one order and the whole report total.

  • Show one normal test. Keep a nearby explanation of the ₹64 example or the first hotel bill. Write each intermediate value so another learner can cross-check it without guessing how you typed the formula.
  • Record a boundary test. If your workbook checks a threshold of ₹100, include a case at exactly ₹100 and cases just above and below when the decision matters. Prove the logical results separately from the rupee totals.
  • Label your assumption type. A number stored as 10% is a rate. A number stored as 10 rupees is an amount. If another sheet supplies the value, inspect its definition before multiplying or subtracting it.
  • State your rounding choice. Showing two decimal places improves readability without normally changing the underlying numeric calculation. When a policy needs each line rounded to cents or paise before summing, do that deliberately with a function covered later in the chapter and test the difference.
  • Compare before and after values. Change only one input in the scratch worksheet. Write the first value and expected second value before looking at the calculated result. Restore the original practice input so another person can repeat the same check.

Quiz · work it out before revealing the answer

Which value does =2+3*4 return?

Fourteen. Excel performs the multiplication first and adds two afterward. Use parentheses around two plus three if the task requires that sum to become the first step.

What is the net if C2 is 64 and D2 is 10%?

₹57.60 under the practice discount rule. First compute the retained share of ninety percent. Multiplying 64 by 0.9 produces the intended amount. Subtracting a plain 0.10 from 64 would give ₹63.90 and represent a different rule.

Two orders have net amounts of ₹100 and ₹104.50. Which pass >100?

Only the second. The first is equal to the boundary. If the written policy instead says “100 or more,” both would pass a greater-than-or-equal requirement.

What does filling E2 down one row do to =C2*(1-$K$2)?

It changes C2 to C3. The two dollar signs fix the K column and row 2. The copied expression uses the next order's amount and the shared scenario input.

Where do the quotes belong in =A2&" / "&J2?

They surround the literal separator including its spaces. A2 and J2 remain cell addresses so the formula can read their contents. Quoting an address would insert the letters of that address into the label.

Why does increasing extras by ₹50 move the Booking total by exactly ₹50?

Under the fictional rule, the room-only tax is calculated before extras are applied. The room amount and tax stay steady. If the total rose by ₹59 instead, investigate whether extras were mistakenly taxed at 18%.

Interview practice · explain the evidence

How would you demonstrate order of operations to someone new to Excel?

I would give them two expressions using the same numbers. Two plus three times four returns fourteen, while grouping the addition first returns twenty. I would connect it to a price calculation where parentheses make the retained discount share clear.

What is the practical difference between typing an answer and typing a formula?

A typed number has its current value. A formula reads inputs and can recalculate when those inputs change. I would edit a practice rate and see whether the result responds as expected, then inspect the expression in the formula bar.

When should a reference be absolute?

I would use an absolute reference when a copied expression should continue reading the same cell. That is appropriate for a shared scenario discount. The order amount should still move down the worksheet to match the new row.

How would you trace a wrong total back to its cause?

I would compare the gross, discounted base, tax and extras in individual cells. Once I know the first unexpected value, I can inspect the two inputs behind it. I would independently compute the expected value for one booking and retest after repairing the formula.

How do you know whether a price comparison works at a threshold?

I would test a known value below the threshold, one equal to it, and one above it. If the requirement is strictly “greater than,” the equal case should return FALSE. The expected logical values document the specific decision the formula implements.

Six cards to recall the calculation

  • Formula entry The equals sign starts a formula. The formula bar shows the actual expression.
  • Precedence Parentheses group an intended first calculation. Division and multiplication of equal priority are processed left to right.
  • Retained share Subtract the discount fraction from one, then apply the result to the original amount.
  • Comparison A comparison returns a logical value. Check the exact boundary rather than only extreme inputs.
  • Fill Relative addresses move with copied formulas. Dollar signs hold the specified row or column in place.
  • Proof Change one input after predicting the result. Inspect the first intermediate amount that disagrees with your prediction.

Continue with SUM and conditional totals to combine values from rows you can already calculate. Use the Excel Task Hub for additional formula tasks, which may use different row layouts.

Microsoft references