Convert Cell Contents to text?

mrmagoo_83

Board Regular
Joined
Mar 7, 2005
Messages
82
I am pulling same data from a webpage, and need to convert a few cells, as they are causing issues.

For Example, one of the colums contains names of teams and such, one of the team names is "=V="; however, Excel returns the @NAME? error to me, even though the cell is formatted as text. In order to get the cell's content to show up correctly I have to add a single quote mark in front of the first "=".

Is there a way to either add the quote mark to the beggining of every cell, or to force this cell to show the name correctly, instead of the @NAME?.
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Babydum

Board Regular
Joined
Feb 24, 2005
Messages
164
Try running this macro:

Code:
Sub Test() 

Cells.Replace What:="=v=", Replacement:="'=v=", LookAt:=xlPart, _ 
SearchOrder:=xlByRows, MatchCase:=False 

End Sub

This is assuming "=v=" is the only team causing you problems.

HTH
 

mrmagoo_83

Board Regular
Joined
Mar 7, 2005
Messages
82
It is not the only one causing the problems :)

I did this instead

Sheets("Teams").Cells(i,2) = "'"&Sheets("Teams").Cells(i,2)

Which worked fine, it just put the " ' " infront of all the teams, which worked great...for now.

Thanks for the help.
 

mrmagoo_83

Board Regular
Joined
Mar 7, 2005
Messages
82
Crud, now that does't work either, darn it. It seems to work for some, but it doens't for others...strange.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,057
Messages
5,835,163
Members
430,343
Latest member
t0m_c

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top