LINQ_Percentage_Find

Hi Expert,
I have an excel file and need to find 18 % value from CC TAXABLE VALUE column and result will come datarows of CC_IGST_18% column. I have tried this invoke code and facing error. Can you help me to achieve this. Attached input for your reference.

For Each row As DataRow In CGIGST.Rows
Dim cgist As Double = Convert.ToDouble(row(“CC_IGST_18%”))
Dim taxablevalue As Double = Convert.ToDouble(row(“CC TAXABLE VALUE”))
row(“CC_IGST_18%”) = taxablevalue*18/100
Next

Input.xlsx (9.4 KB)

Hi @Balachander_Pandian

Try this:

For Each row As DataRow In CGIGST.Rows
    Dim taxableValue As Double = Convert.ToDouble(row("CC TAXABLE VALUE"))
    Dim igst18Percent As Double = taxableValue * 0.18 ' Calculating 18% of taxable value
    row("CC_IGST_18%") = igst18Percent ' Updating the corresponding value in "CC_IGST_18%" column
Next

Regards

@Parvathy Thank you very much … Its works now

1 Like

You’re welcome @Balachander_Pandian

Happy Automation!!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.