Query, that remove blank spaces

Pontos

Board Regular
Joined
Mar 26, 2003
Messages
132
Hi!

In my table are numbers like: 099 200 001, 099 200 002,...
I need to make query on that field, that eliminates blank spaces betwen numbers (099 200 001 --> 099200001).

Rok
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
I tried this on a dummy system, and it worked for me:

NewCode: Replace([SplitCode]," ","",1,2,0) where [SplitCode] is the field that you want to remove the spaces from.

Denis
 
Upvote 0
Thankx!

The query works.
Maybe just quick explanation of the code.
What does the last part of code do (1,2,0)?

Rok
 
Upvote 0
Here's an explanation of the syntax:

Replace («stringexpr», «find», «replace», «start», «count», «compare»)

Where
stringexpr = the starting string or field value
find = text value / string to search for
replace = replacement string / text value
start = starting position in stringexpr (1 to begin at first character)
count = # of occurrences to replace (2 in this case)
compare = method used for comparisons (0 is use database defaults)

Denis
 
Upvote 0

Forum statistics

Threads
1,221,816
Messages
6,162,149
Members
451,746
Latest member
samwalrus

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