Referring to Cells in Formulas

Hi Everyone

This might sound like a really easy question for you guys but I am new to using numbers. When I select a cell to enter a formula and refer to a cell eg C2, and multiply it by another cell (D2), i keep getting an error message which says " the operator "*" expects a number, but cell 'Mass (kg)' Jupiter contains a string". It is like it thinks I am referring to the cells which have the titles in them, Mass (kg) is cell C1 and D1 is what says Jupiter but i want it to multiply the numbers that are in cells C2 and D2.

Does anyone have any ideas?

Cheers
Ken

MacBook 13 inch, Mac OS X (10.6.4), 2.26GHz Intel Core 2 Duo Memory 2GB

Posted on Oct 17, 2010 2:50 AM

Reply
7 replies

Oct 17, 2010 6:55 AM in response to Ken Herington

Ken Herington wrote:
Hi Everyone

This might sound like a really easy question for you guys but I am new to using numbers. When I select a cell to enter a formula and refer to a cell eg C2, and multiply it by another cell (D2), i keep getting an error message which says " the operator "*" expects a number, but cell 'Mass (kg)' Jupiter contains a string". It is like it thinks I am referring to the cells which have the titles in them, Mass (kg) is cell C1 and D1 is what says Jupiter but i want it to multiply the numbers that are in cells C2 and D2.


I guess that you entered the formula

='Mass (kg)'*Jupiter in a cell of row 1

Insert it in row 2.

This formula means :
multiply the content of the (cell of column 'Mass (kg)' of the row where is the formula) by the (cell of column Jupiter of the row where is the formula)

When it is in row 2, it get two numbers to multiply but when it is in row 1, which is a header one, it get two strings to multiply and so it logically issue the described error message.

Yvan KOENIG (VALLAURIS, France) dimanche 17 octobre 2010 15:55:40

Oct 17, 2010 10:38 AM in response to Ken Herington

Ken Herington wrote:
This might sound like a really easy question for you guys but I am new to using numbers. When I select a cell to enter a formula and refer to a cell eg C2, and multiply it by another cell (D2), i keep getting an error message which says " the operator "*" expects a number, but cell 'Mass (kg)' Jupiter contains a string". It is like it thinks I am referring to the cells which have the titles in them, Mass (kg) is cell C1 and D1 is what says Jupiter but i want it to multiply the numbers that are in cells C2 and D2.

Does anyone have any ideas?


Hi Ken,

Two. One on the formula, and one on the unit you've used.

Formula:

=C2*D2 Placed in any cell (except C2 or D2) will return the product of the numbers in C2 and D2, provided both cells either contain numbers or are empty.

=C*D Placed in any cell in row 2 (except C2 or D2) will return the product of the numbers in C2 and D2, provided both cells either contain numbers or are empty.

=C*D$2 Placed in any cell in row n (except Cn or D2) will return the product of the numbers in Cn and D2, provided both cells either contain numbers or are empty. This would allow you to make Row 2 a header row, place the 'Jupiter factor' in D2, list the 'Mass (kg)' (see comment below) starting in row 3, and calculate the product in column D, starting at row 3.

The error message may, as Yvan notes, result from the formula referring to cell C1, where it finds the text string 'Mass (kg)', or, if the formula is not referencing C1, the cell which it is referencing may include text (eg. '100 kg' instead of '100'), or may have been formatted as text. Inclusion of any non-numeric characters (with a few exceptions) in the cell will cause the contents to be interpreted as a text string. Formatting a cell as text will cause anything in that cell (including a number or a formula) to be interpreted as a text string.

Units:

The mass of an object is an intrinsic property of that object, and does not change as the object is transferred from planet to planet. A 1 kg object has a mass of 1 kg whether it is on Earth, the moon, Jupiter or en route from one to another of these bodies. Measuring the object's mass using an equal arm balance or a counterpoise balance will give the same reading (1 kg) in each location (although mechanical considerations may limit the precision of that measurement).

The weight of an object, on the other hand, is a measure of the vertical force exerted on the object due to the gravitational attraction of another object. That weight depends on the mass of the object itself, the mass of the 'other' object(s), and the distance separating the pair. That 1 kg object above will have a different weight on each of the planets, and will vary by about 0.5 percent when determined at different locations on Earth (heaviest at the poles, lightest atop a high mountain at or near the equator). Weight can be measured using a spring scale, which measures the force necessary to support an object against the local gravitational force on that object.

The proper unit of weight in the International System of Units is the Newton, but in common and commercial use (on earth) when we 'weigh' something, we're actually determining its mass, so using the mass unit to report the result is appropriate. Here, though, my interpretation is that you want to determine the 'weight' of the object, not its 'mass', and you should make that distinction in your labels.

Regards,
Barry

Oct 18, 2010 8:48 AM in response to Barry

Barry wrote:
KOENIG Yvan wrote:
Hello Barry

There is a 'funny' behavior in Numbers.


Life is full of little surprises. So is Numbers, as we're finding out. 🙂

Looks like my second guess—including the unit as part of the entry in Cn—might be the cause.

Thanks,
Barry


I noticed some time ago, as long as I can remember really, that if Numbers finds a text field that looks just like a plain number, it will treat it as a number. It's referred to in the documentation as "a string specifying a number". The function VALUE makes the conversions in other spreadsheet programs but is not necessary in Numbers. In Apple's words: "You’ll never need to use the VALUE function in a new table, as numbers in text are automatically converted for you." That may be a little misleading since Numbers doesn't go looking for a number in the midst of other text, but if all the text string is is a number, it will consider it as one.

Jerry

Oct 18, 2010 4:07 PM in response to Jerrold Green1

Jerrold Green1 wrote:
I noticed some time ago, as long as I can remember really, that if Numbers finds a text field that looks just like a plain number, it will treat it as a number. It's referred to in the documentation as "a string specifying a number". The function VALUE makes the conversions in other spreadsheet programs but is not necessary in Numbers. In Apple's words: "You’ll never need to use the VALUE function in a new table, as numbers in text are automatically converted for you." That may be a little misleading since Numbers doesn't go looking for a number in the midst of other text, but if all the text string is is a number, it will consider it as one.

As soon as I saw Yvan's note it triggered a memory of having seen this before as well. I do recall the comment regarding 'never need to use the VALUE function...', and finding that wasn't true for mixed text and numbers.

Memory slip, I guess.

Regards,
Barry

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Referring to Cells in Formulas

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.