A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
If the goal is to return an amount from one cell based on the value in another field on the same row, a lookup formula is the usual pattern.
Example:
=C2*XLOOKUP(TRUE,$A$2:$A$5,$B$2:$B$5)
What it does:
- Looks in
A2:A5forTRUE - Returns the matching value from
B2:B5on the same row - Multiplies that returned value by
C2
If only a simple same-row calculation is needed, Excel formulas start with = and can use cell references directly, for example:
=A2+B2
or
=H2+4
For totals across cells or ranges, a function such as SUM can be used, for example:
=SUM(A1:A2)
References: