0

I have this statement nested in an IF-Statement under a scenario. I would like it to format column 2 into a Accounting number without decimal places. How can this be done using VB.net? The current code gives me ex: 1,000,000.00 on an input of 1000000. I noticed excel has buttons for adding or subtracting decimal places. Could these be called within VB.net? Thanks!

 Lo.ListColumns("Column2").DataBodyRange(CurrentRow).NumberFormat = "ACCOUNTING" 

2 Answers 2

1

Try the following

Lo.ListColumns("Column2").DataBodyRange(CurrentRow).NumberFormat = "#0,000.00" 

You may find help in this Article

Sign up to request clarification or add additional context in comments.

Comments

1

From what i understand you want, you can do:

math.floor(*insert the value or variable you want here*) 

What that does is it changes the number in the parameter to the biggest integer lower than the parameter.

Hope this works :)

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.