Skip to main content

Calculate rounded charges for paired records

Read-only

Step-by-step guide · read-only · Selected G5

Loading your interactive spreadsheet…

Preparing the worksheet and formulas…

Data & tools
Task requirements

Enter one formula in G5. For each of the eight records in source order, calculate Units times Unit rate plus Adjustment, then round that line to two decimals with half-cent ties away from zero. Return eight numeric charges as one column without headings. Keep zeroes and negative refunds; never sort a single input column separately.

Follow the highlighted cells. Switch to Your turn to edit. Answer cells: G5:G12. Enter one formula in G5; keep the rest of the output area clear. Browser calculations may differ from your Excel version.

Selection & formula search

Practice stays on this device. No worksheet data is uploaded.

Notes & examples
About this lesson
LAMBDA workflows15 min·Growing

Map quantity, rate and adjustment together, retaining one rounded result for every record.

THE QUICK ANSWER01

Map quantity, rate and adjustment together, retaining one rounded result for every record.

ƒx=MAP(B2:B9,C2:C9,D2:D9,LAMBDA(qty,rate,adjust,ROUND(qty*rate+adjust,2)))
Example report · G5:G12
G
3.72
0.01
-0.01
-0.25
6.67
0.9
-3.36
1.25

The remaining reserved output cells are blank. Keep that area clear when trying the formula.

The formula uses the interactive worksheet above. Adjust ranges and criteria for your own data.

UNDERSTAND THE IDEA

How it works

Read a whole record

The first line is 3 × 1.235 + 0.01 = 3.715, which rounds to 3.72. The next two outputs are 0.01 and -0.01. MAP preserves all eight positions, including the zero-quantity adjustment.

Preserve alignment

Reordering complete records is safe. Sorting quantities without their rates and adjustments changes the calculation. MAP pairs positions; it does not join by the visible Record label.

Edit within the input contract

Units are numeric integers within ±10,000; rates are numeric from 0 through 1,000 with at most three decimals; adjustments are numeric within ±100 with at most two decimals. Text numbers, blanks and Boolean controls are not numeric inputs. Keep the output area clear. These are fictional teaching prices, not a carrier tariff.

Read the full step-by-step walkthrough
  1. Pair the three source arrays

    MAP reads corresponding positions from Units, Unit rate and Adjustment. It calls the LAMBDA once per record.

  2. Name one value from each array

    qty, rate and adjust are local parameters. Their order matches the three arrays; they are not cell references or workbook names.

  3. Calculate the signed extended charge

    Multiply this record's quantity by its own three-decimal rate. Keep the sign; do not round the rate before multiplying.

  4. Apply the paired adjustment

    Add only this record's cent adjustment to the extended charge before the final rounding. Zero quantity can still leave a nonzero adjustment.

  5. Round each output

    ROUND applies inside the LAMBDA, so every returned line is already rounded to cents. A negative half-cent tie rounds away from zero.

WHEN SOMETHING LOOKS OFF

Things to watch

Rounding the rate first

The rate has up to three decimals. Round the completed line, not its input rate.

Taking an absolute value

A refund keeps its negative sign.

Omitting adjustments

The adjustment belongs to the same record and is applied before rounding.

About this example

Bounded original teaching inputs and source-only assessment; actual browser calculation and spill checks are separate from native-client recalculation and edit/save.

Browser: testedExcel: not verifiedGoogle Sheets: not verified

Content version 1. Practice checks compare calculated results across different datasets; they do not certify every possible formula.

Reference material