数式が結果ではなく文字列として表示される

=B2*C2 を入力しても、セルに 48 ではなく数式そのものが表示されます。内容が文字列として保存されているか、シートが数式の表示モードになっています。シート全体の数式が見えているなら「数式を表示」をオフにします。このメニューは今回クリックしていません。以下は 2026 年 11 月 13 日に Google Sheets で確認した結果です。

目次

要点

=B2*C2 を入力しても、セルに 48 ではなく数式そのものが表示されます。内容が文字列として保存されているか、シートが数式の表示モードになっています。シート全体の数式が見えているなら「数式を表示」をオフにします。このメニューは今回クリックしていません。以下は 2026 年 11 月 13 日に Google Sheets で確認した結果です。

=B2*C2

確認のポイント

Google Sheets では、実際の数式 =B2*C2 は 48 を返し、ISFORMULA は TRUE、ISTEXT は FALSE、FORMULATEXT は =B2*C2 でした。同じ文字を文字列として保存すると、ISFORMULA は FALSE、ISTEXT は TRUE、FORMULATEXT は #N/A です。先頭のアポストロフィは表示されず LEN は 6、先頭の通常の空白(UNICODE 32)は TRIM で取れ、先頭の UNICHAR(160) は TRIM では残りますが SUBSTITUTE で取れます。ただしきれいにした文字列はまだ文字列なので、数式として入力し直す必要があります。

注意点と互換性

Excel では、先に表示形式を文字列にしておくと数式が文字として保存されることが多いですが、今回 Excel では再確認していません。Google Sheets は異なります。書式をプレーン テキストにしてから =B2*C2 を入力しても 48 が返りました。文字列として保存された数式は、書式を自動に戻しただけでは計算を始めず、再入力すると 48 になりました。Google Sheets で = を = に置換するテストを 3 件行ったところ、いずれも文字列のままでした。Excel の検索と置換は実行していません。

英語の詳細例・数式・著者メモ

You type =B2*C2, press Enter, and the cell shows =B2*C2 instead of 48. That happens when the entry is stored as text, or when the sheet is only set to display formulas.

If every formula on the sheet suddenly shows, Show Formulas is on. In Excel that’s on the Formulas tab; in Google Sheets it’s under View > Show > Formulas. Turn it off and the calculated values come back. The setting only changes what’s on screen. I didn’t click those menus for this page. If just one cell or a pasted column is affected while other formulas still calculate, the problem is in the cell, and that’s what I tested below.

The sample: line totals for six products

Type this into A1:C7, and type Line total in D1.

ABC
ProductQuantityUnit price
Desk lamp412
Mouse pad68
Webcam258
USB hub324
Monitor stand175
Keyboard245

In D2, enter:

=B2*C2

When D2 is a real formula, it returns 48. The checks on this page used that same cell.

How to tell text from a formula

With Show Formulas off, and with E2:G2 left in a normal format, enter:

=ISFORMULA(D2)

=ISTEXT(D2)

=FORMULATEXT(D2)

I ran those in Google Sheets on 13 November 2026:

D2 containsD2 displaysISFORMULAISTEXTFORMULATEXT
Formula stored as text=B2*C2FALSETRUE#N/A
Working formula48TRUEFALSE=B2*C2

FORMULATEXT and ISFORMULA are in Excel 2013 and later, and in Google Sheets. If Show Formulas is still on, the diagnostic cells will show their own formulas too, so turn it off before you read them.

A leading apostrophe or space

A character before the equals sign stops calculation even in a normally formatted cell.

I entered '=B2*C2 with a leading apostrophe, the way you type a prefix to force text. The cell displayed =B2*C2, ISFORMULA returned FALSE, and FORMULATEXT returned #N/A. The apostrophe itself did not appear in the cell, and LEN was 6, the same as =B2*C2. Open the formula bar, make sure = is the first character, and press Enter. After that, the cell returns 48.

A leading space is easier to miss. I entered =B2*C2 with an ordinary space in front (UNICODE 32, LEN 7). It stayed text. TRIM removed that space, but the TRIM result is still text until you enter the cleaned string as a formula.

Don’t strip spaces that belong inside quotes or elsewhere in the formula. Only the characters before the first = need to go.

Pasted formulas and non-breaking spaces

Copying from a web page, an email, or a CSV often brings a leading space, an apostrophe, or a non-breaking space (UNICHAR(160)). I stored =B2*C2 with a leading UNICHAR(160): UNICODE returned 160, and TRIM left the character in place. If that character is in D2, =SUBSTITUTE(D2,UNICHAR(160),"") returns the text =B2*C2. That cleaned string is still text; you still have to enter it as a formula. The less common leftover characters are in TRIM not working.

Once the formula is calculating, imported quantities can still be text and throw the result off. That’s a separate problem; converting numbers stored as text covers it.

In Excel, a Text format can also be the cause

In Excel, if the cell was already formatted as Text when the formula was entered, Excel stores the characters instead of evaluating them. I did not re-run that in Excel for this page. The usual fix is to change the format to General, then re-enter the formula; changing the format alone isn’t enough.

Google Sheets is different, and I did test this. I formatted a cell as Plain text and typed =B2*C2. It still returned 48, and ISFORMULA was TRUE. Plain text format did not block a typed formula.

What did stay as text in Sheets was a formula stored as literal text, the same characters written without being entered as a formula. Changing that cell from Plain text back to Automatic left it showing =B2*C2. After I re-entered =B2*C2, it returned 48, ISFORMULA was TRUE, and FORMULATEXT returned =B2*C2.

For a single cell, I’d fix the leading character if there is one, change the format if Excel has it set to Text, and re-enter the formula. I also tried replacing = with = on three text formulas in Google Sheets; they stayed text, so I wouldn’t rely on that trick here. I have not run Find & Replace in Excel for this page.

When it starts calculating and shows an error

If after re-entering you get #NAME? instead of 48, the text problem is gone and the formula is being evaluated. A misspelled function name is the usual cause; see the Excel #NAME? error guide. Don’t keep toggling the number format at that point.

Oscar

表計算の数式とトラブル解決を紹介。検証環境と未確認事項は各記事を参照。

Google Sheets, 13 November 2026, tab formula-as-text. Working =B2*C2 returned 48; ISFORMULA TRUE, ISTEXT FALSE, FORMULATEXT =B2*C2. The same characters stored as text: ISFORMULA FALSE, ISTEXT TRUE, FORMULATEXT #N/A. A typed leading apostrophe displayed =B2*C2 with the prefix hidden, LEN 6. A leading space (UNICODE 32, LEN 7) stayed text; TRIM removed the space. A leading UNICHAR(160) stayed text; TRIM left it, SUBSTITUTE removed it. Typing =B2*C2 into a Plain text cell still returned 48. Clearing Plain text left a stored text formula unchanged; re-entering it returned 48. Replacing = with = on three text formulas left them as text. Excel menus, shortcuts, and Text format were not run in Excel.

次の記事:データの整形と入力 Google Sheets で2列間の重複を強調表示する