#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default Macro-find and sum

Hi, i need a macro to look in column "L" and find last cell that contain the
word "total" and to sum all cells below.
Can this be done?
Thanks allot!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 703
Default Macro-find and sum

Hi

Look at this:

Sub Macro4()

Dim TotalCell As Range
Set TotalCell = Columns("L:L").Find(What:="Total", After:=Range("L1"),
LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlPrevious, _
MatchCase:=False)
MySum = WorksheetFunction.Sum(Range(TotalCell.Offset(1, 9),
TotalCell.End(xlDown)))
msg = MsgBox("MySum = " & MySum)
End Sub

Regards,
Per

On 18 Okt., 16:11, puiuluipui
wrote:
Hi, i need a macro to look in column "L" and find last cell that contain the
word "total" and to sum all cells below.
Can this be done?
Thanks allot!


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Macro-find and sum

Do you ever bother to go back and look at your PREVIOUS posts BEFORE posting
again?

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"puiuluipui" wrote in message
...
Hi, i need a macro to look in column "L" and find last cell that contain
the
word "total" and to sum all cells below.
Can this be done?
Thanks allot!


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,533
Default Macro-find and sum

Hi Don,

I do not think OP see the replys to previous posts.

None of the replys I sent today and some days ago through my newsreader and
Google groups are not visible if you access the newsgroups via
https://www.microsoft.com/office/community. Something is obviously not
working.

--
Per


"Don Guillett" skrev i meddelelsen
...
Do you ever bother to go back and look at your PREVIOUS posts BEFORE
posting again?

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"puiuluipui" wrote in message
...
Hi, i need a macro to look in column "L" and find last cell that contain
the
word "total" and to sum all cells below.
Can this be done?
Thanks allot!



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Macro-find and sum

I have always used msnews.com.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Per Jessen" wrote in message
...
Hi Don,

I do not think OP see the replys to previous posts.

None of the replys I sent today and some days ago through my newsreader
and Google groups are not visible if you access the newsgroups via
https://www.microsoft.com/office/community. Something is obviously not
working.

--
Per


"Don Guillett" skrev i meddelelsen
...
Do you ever bother to go back and look at your PREVIOUS posts BEFORE
posting again?

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"puiuluipui" wrote in message
...
Hi, i need a macro to look in column "L" and find last cell that contain
the
word "total" and to sum all cells below.
Can this be done?
Thanks allot!






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,203
Default Macro-find and sum

You did get a response to this somewhere, right? I see in this post
http://www.microsoft.com/office/comm...b-61f1d9e636dc
that you've got code to do this now?

"puiuluipui" wrote:

Hi, i need a macro to look in column "L" and find last cell that contain the
word "total" and to sum all cells below.
Can this be done?
Thanks allot!

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
Find Macro StillLearning Excel Discussion (Misc queries) 4 September 28th 09 05:57 PM
find max value in macro Steve Excel Discussion (Misc queries) 2 January 6th 09 10:01 PM
Macro to find rjw24 Excel Discussion (Misc queries) 5 August 6th 08 06:10 PM
Get Macro warning, but can't find Macro Stilla Excel Worksheet Functions 1 January 20th 07 01:27 AM
Can't find macro Jim Excel Worksheet Functions 2 December 2nd 04 01:26 PM


All times are GMT +1. The time now is 04:32 PM.

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

About Us

"It's about Microsoft Excel"