Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 148
Default Sum column with errors, Macro

Hi,

I got this great formula from this NG.

=SUMIF(A1:A10,"<"&99^99)

I request for a macro to make the range A1:A10 variable
so it can sum the range where the active cell is.


Thank you.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default Sum column with errors, Macro

sub testsumif
Range("B1").Formula = "=SUMIF(A1:A" & _
Cells(Rows.Count, 1).End(xlUp).Row & ","" < ""&99^99)"
end sub
"Danny" wrote:

Hi,

I got this great formula from this NG.

=SUMIF(A1:A10,"<"&99^99)

I request for a macro to make the range A1:A10 variable
so it can sum the range where the active cell is.


Thank you.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 148
Default Sum column with errors, Macro

Hi Mike,

The macro you provided did not work.
The macro below that I also got from this NG sums where the active cell is.
The difference of the macro below and the one I'm requesting is, no matter
where the active cell is, the one I'm requesting will sum with text and/or
errors.

I tried to edit the macro below but was not able to. Please help.

Thank you.


Sub SumInActiveCell()
With ActiveCell
.Formula = "=SUM(" & _
Range(.Offset(-1, 0), _
.Offset(-1, 0).End(xlUp)).Address(False, False) & ")"
End With
End Sub


"Mike" wrote:

sub testsumif
Range("B1").Formula = "=SUMIF(A1:A" & _
Cells(Rows.Count, 1).End(xlUp).Row & ","" < ""&99^99)"
end sub
"Danny" wrote:

Hi,

I got this great formula from this NG.

=SUMIF(A1:A10,"<"&99^99)

I request for a macro to make the range A1:A10 variable
so it can sum the range where the active cell is.


Thank you.

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
How to sum a column with errors blkane Excel Discussion (Misc queries) 5 April 3rd 07 09:33 PM
MAX value of a column that has #div/0 errors in it Ray Elias Excel Discussion (Misc queries) 2 April 24th 06 03:47 PM
Errors in VB Code since adding macro Susan Excel Discussion (Misc queries) 1 April 11th 06 08:42 PM
SUM a column with errors Joe Gieder Excel Worksheet Functions 3 February 24th 05 07:57 PM
Summing a Column wit errors? Jako Excel Worksheet Functions 4 November 1st 04 07:32 PM


All times are GMT +1. The time now is 08:53 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"