Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
nmd030583
 
Posts: n/a
Default Flagging constants

Jim,

Thank you for your response. With a little bit of work I got the code
to work great. Thanks.
Jim Cone wrote:
NMD,
Experiment with this VBA code on a test sheet.
It will color cells (on the active sheet) that have formulas that
contain the addition or subtraction of numbers.
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware

'-------------------
Sub FindTheNumbersInFormulas()
Dim lngN As Long
Dim rngAll As Excel.Range
Dim rngCell As Excel.Range
Dim strForm As String
Dim strPart As String

Set rngAll = ActiveSheet.UsedRange.SpecialCells(xlCellTypeFormu las)
Application.ScreenUpdating = False
For Each rngCell In rngAll
strForm = rngCell.Formula
For lngN = 1 To Len(strForm)
strPart = Mid$(strForm, lngN, 2)
If strPart Like "+#" Or strPart Like "-#" Then
rngCell.Interior.ColorIndex = 40
Exit For
End If
Next 'lngN
Next 'rngCell
Application.ScreenUpdating = True
Set rngAll = Nothing
Set rngCell = Nothing
End Sub
'------------


wrote in message...
Hello All,
Part of my job is maintenance on a VERY large excel financial workbook.
Well, over time it has been necessary to add constants to some formulas
to get the historical projections to match the historical data (for
example a cell might read =C4-H7+10.2). After a while we have lost
track of all of the all constants we have added to equations. Is there
a way to flag these functions (in my example the 10.2). Thank you in
advance.
NMD


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
how can i obtain polynomial constants when using trendlines. senrats Charts and Charting in Excel 2 March 6th 06 07:28 PM
Finding constants in formulas Co-op Bank Excel Worksheet Functions 1 October 27th 05 02:09 PM
Finding constants in formulas Co-op Bank Excel Discussion (Misc queries) 1 October 27th 05 11:33 AM
vba constants for excel diver Excel Discussion (Misc queries) 2 August 25th 05 07:51 PM
More than 2 constants in Index Ashley Excel Worksheet Functions 1 February 11th 05 06:56 AM


All times are GMT +1. The time now is 06:59 AM.

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

About Us

"It's about Microsoft Excel"