LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Formula using VBA

Hello all

I have a problem with one formula..I want to create a formula into one cell.
However i would like to be recalculated when i change the data (last row of
the data is different every time)

Sub rate_click()
Range("J4").Select
With ActiveCell
Set lastrow =
Worksheets("Pricing").Cells(Worksheets("Pricing"). Rows.Count,
"A").End(xlUp).Row
.Formula = Sum(Range("J19" & lastrow)) / Sum(Range("C19" & lastrow))
Range("J4").Select
End With

End Sub

it does not recognise the function sum!!

Can you please help me why this macro does not work.

Thanks in advance

Regards
angeliki


 
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
Commenting custom formula fields/formula on formula editor Muxer Excel Programming 2 July 24th 03 01:02 AM


All times are GMT +1. The time now is 05:21 PM.

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"