LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Phil
 
Posts: n/a
Default Need help with TRIM function

Hello,

I have a table with these values, some of which are INVALID.

0120120001 VALID
0000212462 INVALID
0150214785 VALID
04874A1234 VALID
0005421424 INVALID
00000A1240 INVALID
0014A27870 INVALID

As you can see, from above:
1 - There are values that are only numeric.
2 - There are ALSO values that are BOTH numeric and text.
3 - You will also notice that there is a only ONE type of pattern in these
numbers and that is with the numbers that begin with a 0 (zero), then have 9
numbers following, eg 04874A1234.
4 - To clarify, I have indicated which are the VALID and INVALID values,
please disregard the mentioning of the actual VALID and INVALID text, it is
NOT in the datasets.

I need to run a TRIM function that will:
a) disregard any values that are VALID,
b) trim off ALL of the leading zeros EXCEPT the last zero in ANY of the
INVALID's.

How can this be done?

BTW, since I will be importing this into Access, and Access DOES NOT like
mixed datatypes, ALL of the values will need to be TEXT (or should they be
GENERAL?).

TIA for your replies.

Phil.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
Hyperlinks using R[1]C[1] and offset function in its cell referenc Elijah-Dadda Excel Worksheet Functions 0 March 5th 05 03:31 AM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 02:29 PM
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. Robert AS Excel Worksheet Functions 4 December 2nd 04 10:49 AM
Find a Function to use accross different worksheets R. Hale Excel Worksheet Functions 3 November 25th 04 07:07 AM


All times are GMT +1. The time now is 10:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"