#1   Report Post  
Posted to microsoft.public.excel.programming
a a is offline
external usenet poster
 
Posts: 51
Default At wits end

Okay - I know that this must have something to do with the fact that
"sumif" is a function and somehow related to the application. This is
what I have tried and I still cannot make this thing work.

myEngTotal.Formula = "=application.sumif( " &
myEngRange.Columns(1).Address(True, True) & "," & "Total" & "," &
myEngRange.Columns(1).Address(False, False) & ")"

Any help would be greatly appreciated.

Thanks in advance,
Anita
Would anybody be able to help me with the following problem.

For myEngTotal.Formula I want to use a sumif - with the first part of
the range being an absolute range and the sum range being relative. The
criteria I want to use is "total". I can't seem to get the syntax right
on this.

Can anybody help?

Thanks much in advance,
Anita




Dim myEngRange As Range
Dim myEngTotal As Range
Range("b1").Activate
Set myEngRange = ActiveSheet.UsedRange
Set myEngTotal = myEngRange.Offset(myEngRange.Rows.Count).Rows(1)
myEngTotal.Cells(1) = myEngRange.Columns(1).Address
myEngTotal.Cells(1) = myEngRange.Columns(1).Address(False, False)
myEngTotal.Formula = "=sum( " &
myEngRange.Columns(1).Address(False, False) & ")"

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default At wits end

You want something like:
myEngTotal.Formula = "=sumif( " & _
myEngRange.Columns(1).Address(True, True) & "," & """Total""" & "," & _
myEngRange.Columns(1).Address(False, False) & ")"

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"a" wrote in message
hlink.net...
Okay - I know that this must have something to do with the fact that
"sumif" is a function and somehow related to the application. This is
what I have tried and I still cannot make this thing work.

myEngTotal.Formula = "=application.sumif( " &
myEngRange.Columns(1).Address(True, True) & "," & "Total" & "," &
myEngRange.Columns(1).Address(False, False) & ")"

Any help would be greatly appreciated.

Thanks in advance,
Anita
Would anybody be able to help me with the following problem.

For myEngTotal.Formula I want to use a sumif - with the first part of
the range being an absolute range and the sum range being relative. The
criteria I want to use is "total". I can't seem to get the syntax right
on this.

Can anybody help?

Thanks much in advance,
Anita




Dim myEngRange As Range
Dim myEngTotal As Range
Range("b1").Activate
Set myEngRange = ActiveSheet.UsedRange
Set myEngTotal = myEngRange.Offset(myEngRange.Rows.Count).Rows(1)
myEngTotal.Cells(1) = myEngRange.Columns(1).Address
myEngTotal.Cells(1) = myEngRange.Columns(1).Address(False, False)
myEngTotal.Formula = "=sum( " &
myEngRange.Columns(1).Address(False, False) & ")"



  #3   Report Post  
Posted to microsoft.public.excel.programming
a a is offline
external usenet poster
 
Posts: 51
Default At wits end

Dear Rob van Gelder,

Thank you so much! That worked perfectly!!!!

Anita

Rob van Gelder wrote:

You want something like:
myEngTotal.Formula = "=sumif( " & _
myEngRange.Columns(1).Address(True, True) & "," & """Total""" & "," & _
myEngRange.Columns(1).Address(False, False) & ")"


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
Wits end wrt automatic linking TheMilkGuy Excel Discussion (Misc queries) 3 April 8th 11 04:59 PM
Text to rows...at wits end Anonon Excel Worksheet Functions 3 October 31st 06 08:56 AM


All times are GMT +1. The time now is 11:59 AM.

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"