Avatar of wcody
wcodyFlag for United States of America asked on

Cell Format

Can anyone tell me what is wrong with the formulas in column G?
Book5.xlsx
Microsoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
GrahamSkan

8/22/2022 - Mon
Adam Brown

There's a space in front of each of the numbers in Column F. That's breaking the calculation because it's multiplying a string by a number.
ASKER
wcody

So how do I correct the problem?
Adam Brown

You have to make sure the numbers in F get added without the space or go to each cell in column F and remove the extra space from in front of the numbers.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Saqib Husain

Either do a search/replace for the space character

or use a formula like this

=E2*SUBSTITUTE(F2,CHAR(160),"")
Saqib Husain

To do a search/replace

Select the character in the cell. (You would have to do this because the space is not a normal space) and then paste it in the search box.
ASKER CERTIFIED SOLUTION
helpfinder

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
GrahamSkan

The nub of the problem is that the formula does arithmetic when the cells are formatted as text, even though they contain numbers.

It is easy to set the format of cells to text, but there is no obvious way to reverse the process. You have used one way, but that would be tedious if you have more than your six cells to do.

Microsoft has an article here:
http://support.microsoft.com/kb/291047

It lists seven methods, including the one that you used. I think this would be the quickest in your case

"Use the Text to Columns Command
This method works best if the data is arranged in a single column. The following example assumes that the data is in column A and starts in row 1 ($A$1). To use this example, follow these steps:

    Select one column of cells that contain the text.
    On the Data menu or ribbon, click Text to Columns.
    Under Original data type, click Delimited, and click Next.
    Under Delimiters, click to select the Tab check box, and click Next.
    Under Column data format, click General.
    Click Advanced and make any appropriate settings for the Decimal separator and Thousands separator. Click OK.
    Click Finish."
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.