Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Rounding Percentage


I have one excel file and all the figures inside in the cells are in
such as 95.23% in cell (1,1) and 92.46% cell (1,2). How can I write
VBA so as to convert them into 95 and 92 respectively?

Besides, I also want to set a option for users to choose:
option 1: change 95.23% to 95.23 (2 decimal place)
option 2: change 95.23% to 95 (no decimal place)

Hope you all can help me as it is very urgent in my assignment.
thank

--
briancy
-----------------------------------------------------------------------
briancyk's Profile: http://www.excelforum.com/member.php...fo&userid=1536
View this thread: http://www.excelforum.com/showthread.php?threadid=26982

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Rounding Percentage

Hi
for rounding see:
http://www.xldynamic.com/source/xld.Rounding.html#vba

--
Regards
Frank Kabel
Frankfurt, Germany

"briancyk" schrieb im
Newsbeitrag ...

I have one excel file and all the figures inside in the cells are in

%
such as 95.23% in cell (1,1) and 92.46% cell (1,2). How can I write a
VBA so as to convert them into 95 and 92 respectively?

Besides, I also want to set a option for users to choose:
option 1: change 95.23% to 95.23 (2 decimal place)
option 2: change 95.23% to 95 (no decimal place)

Hope you all can help me as it is very urgent in my assignment.
thanks


--
briancyk
---------------------------------------------------------------------

---
briancyk's Profile:

http://www.excelforum.com/member.php...o&userid=15365
View this thread:

http://www.excelforum.com/showthread...hreadid=269826


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default Rounding Percentage


Pct = Round(Pct, 2)


On Sat, 16 Oct 2004 08:46:23 -0500, briancyk
wrote:


I have one excel file and all the figures inside in the cells are in %
such as 95.23% in cell (1,1) and 92.46% cell (1,2). How can I write a
VBA so as to convert them into 95 and 92 respectively?

Besides, I also want to set a option for users to choose:
option 1: change 95.23% to 95.23 (2 decimal place)
option 2: change 95.23% to 95 (no decimal place)

Hope you all can help me as it is very urgent in my assignment.
thanks


Reply
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
ROUNDING FORMULA =ROUND(B12/$B$10,1) ROUNDING TO HIGH SunshineinFt.Myers[_2_] Excel Worksheet Functions 7 March 5th 09 06:41 PM
Rounding a Calculated Percentage to the Nearest 5 Jeremy Excel Discussion (Misc queries) 9 January 15th 08 07:12 PM
I need a formula with rounding up & rounding down to the nearest . Tony Kay Excel Worksheet Functions 3 May 29th 07 11:13 PM
Calculating a percentage with the end percentage in mind Shadowshady Excel Discussion (Misc queries) 2 June 17th 06 09:41 AM
Percentage rounding error in charts Tracey Excel Discussion (Misc queries) 4 May 14th 05 04:01 AM


All times are GMT +1. The time now is 05:47 PM.

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"