MS Excel blues

DairyBoy

Member
Join Date
Jun 2007
Location
UK
Posts
393
Hello all. I've got a column of numbers that represent modules & terminals, listed as 16/1, 16/2 etc and I'm looking for a way to replace say, the 16s with 17s etc but excel always converts it to a calendar date (taking it to be 17/jan/2013, 17/feb/2013) as part of the replace, irrespective of the cell formatting for that group. Does anyone know how I can avoid this? Thanks.
 
Do you have the cell format set to "Text"? This should prevent Excel from trying to reformat your data.
 
A couple of ways, off the top.
1. precede each with the single quote character, this tell Excel to treat the data as text.
2. change the dividing character to a non mathematical symbol.
3. format the cell as "Text" but this does not always fix these issues.
4. if using a formula for the change, use an ASCII or text function to 'wrap' your formula in.

Excel is powerful but it does have a learning curve that is steeper than some.
 
In the US date format the same problem occurs when we enter 1/16 instead of 16/1.

The easy fix is click on the letter at the top of the column. This will highlight the entire column. Then click on the format bar in the number menu item at the top and select "text". That should do it. You can also format the column by hitting CTRL-1 after clicking the letter at the top of the column, or just select a range of cells if you don't want the whole column as text.
 
Thanks guys. I have been using text format -and a few others besides, but all gave a result that changed to another format when I hit the replace button. I like the single quote solution. I can strip that out after. Thanks.
 

Similar Topics

Hi, I'm trying to export data from a DataGrid to Excel using VBA, but I'm getting an error "Object doesn't support this property or method". The...
Replies
0
Views
71
I don't know if this is the right place for the subject at least I'll try. The company has one of the oldest computers that is a master Windows...
Replies
5
Views
733
Hi, I'm just looking for a simple way to make a button in excel (via VBA I presume) to toggle a bit in RSLogix 5000. I just got FactoyTalkLinx...
Replies
9
Views
526
Hello, I want to send the data from Rslogix500 to Excel. I created a connection between RSlinx and Excel. The values in Excel automatically...
Replies
5
Views
1,164
Hi guys, Im back again, this time I cannot minimized excel even though i put 6 on the exec mode.. this is my cicode.. Exec("C:\Program...
Replies
1
Views
1,089
Back
Top Bottom