ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Need to place 3 formuals in VBA (https://www.excelbanter.com/excel-programming/377020-need-place-3-formuals-vba.html)

jln via OfficeKB.com

Need to place 3 formuals in VBA
 
Ok what i have is formuals that start in row 41 columns F,G,I and match the
length of data in column E.

=C41*E41/360 Goes in F

=F41*30 Goes in G

=G41+H41 Goes in I

SO im thinking that i need to have a count of row E then add the formuals
into the three columns. SO how do I do this?

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200611/1


Charles Chickering

Need to place 3 formuals in VBA
 
Here's the basic concept using FormulaR1C1:

dim lRow as long
lRow = Range("E" & Rows.Count).End(xlUp).Row
Range("F41:F" & lRow).FormulaR1C1 = "=RC[-3]*RC[-1]/360"
Range("G41:G" & lRow).FormulaR1C1 = "=RC[-1]*30"
Range("I41:I" & lRow).FormulaR1C1 = "=RC[-2]+RC[-1]"

--
Charles Chickering

"A good example is twice the value of good advice."


"jln via OfficeKB.com" wrote:

Ok what i have is formuals that start in row 41 columns F,G,I and match the
length of data in column E.

=C41*E41/360 Goes in F

=F41*30 Goes in G

=G41+H41 Goes in I

SO im thinking that i need to have a count of row E then add the formuals
into the three columns. SO how do I do this?

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200611/1




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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com