I'm trying to upload data from an Excel 2007 spreadsheet to the mainframe. To satisfy my clients needs, I've created a macro that processed the data. I'm working with as many as 5 decimal places, with only 2 decimals displayed in the spreadsheet. The client wants the DISPLAYED value uploaded, with the decimal point removed. This data's intended use will be for a COBOL program.
Here's my problem.
Actual value: 75.09625 (cell C54)
Display: 75.10
Desired output: 7510
VBA Formula: round(C54,2)*100 = 7510
....this is GOOD.
Actual value: 191.485 (cell C55)
Display: 191.49
Desired output: 19149
VBA Formula: round(C55,2)*100 = 19148
Using the same formula in the Excel grid yields the desired output (19149).
This only happens when the actual value has 3 decimal places, ending in a 5.
Does anyone have a clue how to get the desired output in VBA code?
Randy
Here's my problem.
Actual value: 75.09625 (cell C54)
Display: 75.10
Desired output: 7510
VBA Formula: round(C54,2)*100 = 7510
....this is GOOD.
Actual value: 191.485 (cell C55)
Display: 191.49
Desired output: 19149
VBA Formula: round(C55,2)*100 = 19148
Using the same formula in the Excel grid yields the desired output (19149).
This only happens when the actual value has 3 decimal places, ending in a 5.
Does anyone have a clue how to get the desired output in VBA code?
Randy