Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
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? | Excel Worksheet Functions | |||
how to loose all numbers after decimal (not rounding) | Excel Worksheet Functions | |||
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? | Excel Worksheet Functions | |||
Mistake of changing decimal into whole numbers | Excel Discussion (Misc queries) | |||
finding common numbers in large lists | Excel Worksheet Functions |