Format a formula in a table cell

Format a formula in a table cell

dennis
Advisor Advisor
851 Views
1 Reply
Message 1 of 2

Format a formula in a table cell

dennis
Advisor
Advisor

I am adding rows to a table, and want to copy the formulas I have in two cells into the appropriate places of the newly created rows.  I can get everything working just fine except the formating of the formula.  Therein lies my request for help.  How do you format a formula to show as Architectural Units rather than just decimal?  As well, I want only two decimal places rather than four that I am getting now. A bit of the code i am writing

cellSet8 = retTable.GetDataFormat(1, 8, 0) ' exisiting cell with formula

Call retTable.SetDataFormat(2, 8, 0, cellSet8) 'newly created cell

THen I put the formula in, with slight modification, changing the row number to the new row number.

If i don't make this change, it seems to work fine....just gives me the wrong row data.

If I make the change, then I get decimal units rather than architectural units.

 

Anyone have a few snippets in the order that I should call them to get this right?

0 Likes
Accepted solutions (1)
852 Views
1 Reply
Reply (1)
Message 2 of 2

dennis
Advisor
Advisor
Accepted solution

Figured it out.  I was setting the cell format prior to entering the formula.  It appears it must be entered after the cell is populated with the formula.

Live and learn.Smiley Happy

 

0 Likes