I have a spreadsheet that I need to trim 3 columns. I have scoured the net but can't find anything that I've been able to use to trim each cell in columns A, H and I. Any help is appreciated.
I am using Excel 2003 and VS2005.

You mean trim each cell like "change all of these cells to have only 2 decimal points" (like change 14.05001 to 14.05)? And do you want to make it permament, or only show the first two decimals? Hiding the extra digits will let you get more accurate results later (if you round 14.5 then multiply by 2, you get 15 * 2 = 30, if you just hide the extra digits, 14.5 * 2 = 39.)

Anyway, if you just want to hide the extra digits, right-click a cell and choose "formatting" and enter "show 2 decimal places (or whatever.)

If your really want to cut the extra digits, then either change your formula (=SUM(A1:B3) becomes =ROUND(SUM(A1:B3), 2)) or you may need to create some kind of macro or something that you can run whenever you want to update.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.