Hi,
I have a weird situation here. I've got some data in excel format like below (sample):
| ITEM | QUANTITY | RATE/UNIT |
| ABC | 2 | 97.8 |
| ASD | 13 | 125.2 |
| ZXC | 1 | 294 |
| QWE | 5 | 35.7 |
| POI | 7 | 201 |
| LKJ | 30 | 177.1 |
| MNB | 25 | 208.1 |
| XYZ | 18 | 123.3 |
Also, I've been given the sumtotal value i.e. the total after (QUANTITY x RATE/UNIT) of each item which in this case is 16431.02. But if I do a sumproduct on excel on the given data it gives 16437.60 which is due to the data of column RATE/UNIT being rounded to either 0 or 1 place after decimal place (.) and pasted as value so I cannot know what the two decimal value of the cell should be.
I'm trying to convert the data of column RATE/UNIT to numbers with two decimal places using the available data mentioned above using c#.
Can anybody help me on this ?



Sachin SinghRank #66 · 26.2K reputationPosted Nov 14, 2021, 1:04 AM EST
Rijwan AnsariRank #82 · 24.2K reputationPosted Nov 14, 2021, 11:53 AM EST
Sachin SinghRank #66 · 26.2K reputationPosted Nov 15, 2021, 2:31 AM EST
Jayanta Mukherjee123 reputationPosted Nov 13, 2021, 10:22 AM EST
Hi Sachin, I need to round every item of RATE/UNIT so that when I multiply them by their respective counterpart of QUANTITY column and sum them then the result is 16431.02. The desired result in this case should be as below:
Hope you now understand what I'm trying to do
Srinivasan RamamoorthiRank #877 · 2.5K reputationPosted Nov 13, 2021, 2:45 PM EST
Srinivasan RamamoorthiRank #877 · 2.5K reputationPosted Nov 13, 2021, 2:46 PM EST
Vikas PanwarRank #1,447 · 1.1K reputationPosted Nov 15, 2021, 1:09 AM EST