Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Too Many Numbers After The Decimal


I'm trying to update the prices of several thousand products, so i'm
useing the vlookup function, but the prices that are getting displayed
have 5 or 6 numbers after the decimal. how can i condense this down
into only 2 without using the format option.


--
RChicken
------------------------------------------------------------------------
RChicken's Profile: http://www.excelforum.com/member.php...o&userid=33601
View this thread: http://www.excelforum.com/showthread...hreadid=558478

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Too Many Numbers After The Decimal


You can try this code

Sub round_2_decimal()
'assuming the data is column a
rowcount = Cells(Cells.Rows.Count, "a").End(xlUp).Row
For i = 1 To rowcount
Range("a" & i).Select
valu = ActiveCell.Value
valu = Round(valu, 2)
ActiveCell = valu
Next
End Sub


--
jetted
------------------------------------------------------------------------
jetted's Profile: http://www.excelforum.com/member.php...o&userid=17532
View this thread: http://www.excelforum.com/showthread...hreadid=558478

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Too Many Numbers After The Decimal


i'm sure that works, but i have no idea where to put that. Isn't there
just a find and replace to get rid of those extra numbers?


--
RChicken
------------------------------------------------------------------------
RChicken's Profile: http://www.excelforum.com/member.php...o&userid=33601
View this thread: http://www.excelforum.com/showthread...hreadid=558478

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default Too Many Numbers After The Decimal

Use the round () function like in

=round(vlookup(...);2)

to round the result into 2 decimal places

Hans


RChicken schrieb:

I'm trying to update the prices of several thousand products, so i'm
useing the vlookup function, but the prices that are getting displayed
have 5 or 6 numbers after the decimal. how can i condense this down
into only 2 without using the format option.


--
RChicken
------------------------------------------------------------------------
RChicken's Profile: http://www.excelforum.com/member.php...o&userid=33601
View this thread: http://www.excelforum.com/showthread...hreadid=558478


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Too Many Numbers After The Decimal


nevermind i got it and it didn't work, so i had to correct your
spellings of valu with value and now it works.


--
RChicken
------------------------------------------------------------------------
RChicken's Profile: http://www.excelforum.com/member.php...o&userid=33601
View this thread: http://www.excelforum.com/showthread...hreadid=558478

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
Help! How do you get excel to find the x(changes daily, marked in a cell from another formula) highest numbers in a group of numbers and sum them up? C-Man23 Excel Worksheet Functions 3 January 19th 06 09:52 AM
how to loose all numbers after decimal (not rounding) arjay9 Excel Worksheet Functions 3 January 13th 06 01:00 AM
Help! How do you get excel to find the x(changes daily, marked in a cell from another formula) highest numbers in a group of numbers and sum them up? C-Man23 Excel Worksheet Functions 1 January 9th 06 01:23 PM
Mistake of changing decimal into whole numbers Roberta Excel Discussion (Misc queries) 2 December 29th 05 03:05 PM
finding common numbers in large lists Jenn Excel Worksheet Functions 1 November 11th 04 07:42 PM


All times are GMT +1. The time now is 02:57 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"