Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default .Formula Property returning or setting inconsistent results?

Hi All - I have two sections of code; one to handle credits, and therefore
the formula includes "+" signs, and the other to handle debits, and the
formula includes "-" signs. The code for the Credits works fine and returns a
proper formatted formula line in all cases (that begins with an "=" sign).
The code for Debits never includes the "=" sign at the beginning of any
return strings.

Can anyone spot why?

Credit Code:
wsDST.Cells(InFundFirstMtyRow, iColCnt).Formula = _
CStr(wsDST.Cells(InFundFirstMtyRow, iColCnt).Formula) & "+"
& _
CStr(wsSRC.Cells(iRowCnt, "E").Formula)
Above returns strings like "=4357.76+2345.65"

Debit Code:
wsDST.Cells(OutFundFirstMtyRow, iColCnt).Formula = _
CStr(wsDST.Cells(OutFundFirstMtyRow, iColCnt).Formula) & "-"
& _
CStr(wsSRC.Cells(iRowCnt, "D").Formula)
Above returns string like "4357.76-2345.65"

Thanks Much :)
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Returning zero if the results of a formula is a negative number? James23 Excel Discussion (Misc queries) 7 April 21st 08 11:08 AM
Formula results inconsistent. CyberTootie Excel Worksheet Functions 3 October 15th 06 03:20 PM
Array formula returning wrong results TUNGANA KURMA RAJU Excel Discussion (Misc queries) 1 November 19th 05 10:29 AM
Setting the formula property of a textbox dino Excel Programming 1 June 30th 04 11:03 AM
setting formula property Ed Stevens Excel Programming 1 September 9th 03 04:59 AM


All times are GMT +1. The time now is 12:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"