How to find same amount of charachters from string with special charachters and different lenght

yomero

Active Member
Joined
May 14, 2008
Messages
257
Hi how can i get the same amount of left characters from values regardless if they have a "minus" sign at the beginning

Example
-114.3583 = -114.35
-41.89737 = -41.89
23.2321112 = 23.23
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
If you only want to see 2 decimal places - without actually changing the cell value, just set the format to only show 2 decimal places.

If you want to actually CHANGE the value, the maybe this?

A​
B​
C​
1​
-114.3583-114.35
-114.35​
2​
-41.89737-41.89
-41.89​
3​
23.2321112
23.23
23.23​
C1=ROUNDDOWN(A1,2)
 
Last edited:
Upvote 0
My fields are stored as Strings, not numbers :(



If you only want to see 2 decimal places - without actually changing the cell value, just set the format to only show 2 decimal places.

If you want to actually CHANGE the value, the maybe this?

A​
B​
C​
1​
-114.3583-114.35
-114.35​
2​
-41.89737-41.89
-41.89​
3​
23.2321112
23.23
23.23​

<tbody>
</tbody>

C1=ROUNDDOWN(A1,2)
 
Upvote 0
OK, same example...
C1=LEFT(A1,FIND(".",A1,1)+2)
copied down

edit: My apologies, just noticed this is in teh Access section, not Excel
 
Last edited:
Upvote 0

Forum statistics

Threads
1,221,827
Messages
6,162,202
Members
451,752
Latest member
freddocp

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