Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I exported my Crosstab query from Access into Excel since the date ranges
vary and the end column has to be totalled up. I try using the NumberFormat: See code below. The total cell does just rounds the number even though it shows 2 decimal places. 'Add up the totals horizontally to get a sum amount. For i = intDataStartRow To intRows intValue = 0 For j = intDataStartCol To intCols Cells(i, j).NumberFormat = "0.00" intValue = Cells(i, j).Value + intValue Next j 'Next column Cells(i, j).NumberFormat = "0.00" Cells(i, j).Value = intValue 'insert the sum now that we are done with the column. Cells(i, j).Font.Bold = True 'bold it Next i 'Next row Thanks in advance!! From Access Guy |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
chart keeps putting the values together on same line | Excel Discussion (Misc queries) | |||
hide values and display a decimal point that fills the cell | Excel Worksheet Functions | |||
how do I stop excel putting a space after a decimal point | Excel Discussion (Misc queries) | |||
putting values into cells is slow | Excel Programming | |||
Putting correct values in cells | Excel Programming |