Tom please respond..it works but but not completely

B

bruce forster

Tom

Thanks for the input on my message dated 4/6/2004. The code you gave worked but there is one more question. Please see post on 4/8/04. Thanks for all the help.
 
B

Bob Phillips

Bruce,

Is this what you mean, based on multiplying by the value in Fn

For Each Cell In Sheets("IncStmtAssump").Range("C2:C50")
If Cell.Value = "Input" Then
Sheets("Sheet3").Range(Cell.Offset(0, -1).Address).Formula = _
"=IncStmtAssump!D" & Cell.Row
ElseIf Cell.Value = "Revenue" Then
Sheets("Sheet3").Range(Cell.Offset(0, -1).Address).Formula = _
"=IncStmtAssump!D" & Cell.Row & "*IncStmtAssump!F" & Cell.Row
End If
Next

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

bruce forster said:
Tom.

Thanks for the input on my message dated 4/6/2004. The code you gave
worked but there is one more question. Please see post on 4/8/04. Thanks
for all the help.
 
B

Bruce Forster

Bob...it works but still having a minor problem. I need to have a formula that calculates % growth from the previous year which would look like this Previous Years Revenue * (1+Growth Assumption) Here is the code I am attempting but am getting an error

For Each Cell In Sheets("IncStmtAssump").Range("C2:C50"
If Cell.Value = "Input" The
Sheets("Sheet3").Range(Cell.Offset(0, -1).Address).Formula =
"=IncStmtAssump!D" & Cell.Ro
ElseIf Cell.Value = "Revenue" The
Sheets("Sheet3").Range(Cell.Offset(0, -1).Address).Formula =
"=IncStmtAssump!D" & Cell.Row & "*(1+IncStmt!D)" & Cell.Ro
End I
Nex

Can you provide any assistance?
 
B

Bob Phillips

Bruce,

not tested it, but try

For Each Cell In Sheets("IncStmtAssump").Range("C2:C50")
If Cell.Value = "Input" Then
Sheets("Sheet3").Range(Cell.Offset(0, -1).Address).Formula = _
"=IncStmtAssump!D" & Cell.Row
ElseIf Cell.Value = "Revenue" Then
Sheets("Sheet3").Range(Cell.Offset(0, -1).Address).Formula = _
"=IncStmtAssump!D" & Cell.Row & "*(1+IncStmt!D" & Cell.Row & ")"
End If
Next


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

Bruce Forster said:
Bob...it works but still having a minor problem. I need to have a formula
that calculates % growth from the previous year which would look like this
Previous Years Revenue * (1+Growth Assumption) Here is the code I am
attempting but am getting an error.
 
B

bruce forster

Bob: IT WORKED. Thanks. I hope you will continue to be available to answer a few more questions regarding my programming. The help I have gotten on this site has been invaluable

thanks

One question I do have and will send my code later is how to make a graph that changes when inputs change. I think it is referred to as a dynamic chart

Talk to you soon.
 
T

Tom Ogilvy

The easy way is to use named ranges defined by formulas - dynamic ranges:

http://support.microsoft.com/default.aspx?scid=kb;en-us;183446&Product=xlw
XL: Using Defined Names to Automatically Update a Chart Range

If you want code:

http://support.microsoft.com/default.aspx?scid=kb;en-us;157940&Product=xlw
XL97: How To Create a Dynamic Chart Using Visual Basic

http://support.microsoft.com/default.aspx?scid=kb;en-us;213780&Product=xlw
XL2000: How to Use Visual Basic to Create a Dynamic Chart

http://support.microsoft.com/default.aspx?scid=kb;en-us;146055&Product=xlw
Using Visual Basic to Create a Chart Using a Dynamic Range

--
Regards,
Tom Ogilvy


bruce forster said:
Bob: IT WORKED. Thanks. I hope you will continue to be available to
answer a few more questions regarding my programming. The help I have
gotten on this site has been invaluable.
thanks.

One question I do have and will send my code later is how to make a graph
that changes when inputs change. I think it is referred to as a dynamic
chart.
 
Top