View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default sum numbers is a column

Sub AAA()
Dim rng As Range, cell As Range
Set rng = Columns(1).SpecialCells(xlFormulas, xlNumbers)
For Each cell In rng
MsgBox cell.Address & vbNewLine & _
cell.Formula & vbNewLine & _
cell.DirectPrecedents.Address
Next

End Sub

this probably isn't what you want, but it may give you some ideas.

--
Regards,
Tom Ogilvy


"VilMarci" wrote:

Dear Group,

I have a big issue.
Here's the situation:
I have numbers in a column:

123
465
782
134
....
lot of numbers....

And a few sums: 1313, 6464...

I have to find out where those sums are coming from. They should be sums of
the numbers in that column.
To make things harder I do not know how many numbers shall I add together.

Please advise how to write a fuction that helps me out. I know vba but this
looks a bit over my skills.

Many thanks,
Marton