Access Poser

steven H

Board Regular
Joined
Feb 19, 2002
Messages
66
I realise this is not the place.... But my recordset is nearly 1 million. So Access would be the easiest way forward.

I have tel numbers containing all sorts of spaces, dashes etc,in one column. I want to run an update query to an empty column which removes blanks and dashes leaving the tel no as a the numbers

ie 01253-202121 would be 01253202121

This is in order that I can lookup and match on telno from another list. Any help would be appreciated
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
I'm not familiar with the VBA for Access, but in excel you could do it in the following way:
Code:
Sub OnlyNumbers()
Dim FinalStr As String
For i = 1 To Len(ActiveCell.Value)
If IsNumeric(Mid(ActiveCell.Value, i, 1)) = True Then FinalStr = FinalStr + Mid(ActiveCell, i, 1)
Next
ActiveCell.Value = FinalStr

_________________
Hope this helps.
Kind regards, Al.
This message was edited by Al Chara on 2002-04-18 10:10
 
Upvote 0
If you could get your data into excel then you could throw the code into a FOR loop that will do EACH cell in the ACTIVESHEET's USEDRANGE.
 
Upvote 0

Forum statistics

Threads
1,213,557
Messages
6,114,287
Members
448,562
Latest member
Flashbond

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