Text to Columns does not work

Neville Bentley

Board Regular
Joined
Oct 3, 2007
Messages
101
Hi Out there,

I have a report, which I get from BW (SAP Reporting tool) when I export it to Excel I get a very annoying characteristic happening with in Excel. Because it is text, excel puts a character in front of the text so that it does not get formatted - that is the only thing I can think of.
If I use the "Text to Columns" function under the Data tab I get no joy.

Does anyone know how to get rid of this "Invisible" character so that I can do a VLOOKUP on it.

Here is an example: 'UK > Australia AF I need it to look like UK > Australia AF without the ' character.

Cheers

Neville
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Hi Neville

That ' should be acting as a prefix character and shouldn't be impacting on a VLOOKUP you run (unless they are numeric values in the cell, in which case the ' will convert to text). Are you sure the presence of this character is throwing out your Vlookups?
 
Upvote 0
Richard,

Thanks for the reply.
I have manually taken out the ' character and the VLOOKUP works fine. Even the Find and replace does not work.

I have at least 4000 rows of data x by 4 columns of Text for a lookup function.

Cheers

Neville
 
Upvote 0
Mike, Thanks for the reply.

I do not know how to find that out. It is a straight data dump from a BW cube (R3 SAP).

Perhaps a bit of VBA code - as in a Function or macro I could put into my "Personal.xls" and run it when the need arises?

Cheers

Neville
 
Upvote 0
To test one cell
=FIND(CHAR(160),A1) will be instructive.
But if removing the appostrophy fixes things, then I doubt that is the problem.

This will remove all the leading apostrophyies (and convert formulas to values)
Code:
Sub test()
Dim outArray As Variant
Dim i As Long
Dim j As Long
With ActiveSheet.UsedRange
    ReDim outArray (1 To .Rows.Count, 1 to .Columns.Count)
    For i = 1 To .Rows.Count
        For j = 1 To .Columns.Count
            outArray(i, j) = .Cells(i, j).Text
        Next j
    Next i
    .Value = outArray
End With
End Sub
 
Upvote 0
Hi,
Try this: select your data, switch to the VBEditor (Alt+f11), then open the Immediate window (Ctrl+G), type this in:
Code:
selection.formula = selection.value
and press Enter.
HTH
 
Upvote 0

Forum statistics

Threads
1,214,834
Messages
6,121,874
Members
449,056
Latest member
ruhulaminappu

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
Back
Top