I need to setup an equation or macro that will take all the cells (a2:a60000)
that are not null and add them together. How is this accomplished?
-tia
I need to setup an equation or macro that will take all the cells (a2:a60000)
that are not null and add them together. How is this accomplished?
-tia
Just use SUM. It will add up all numeric cells...
=SUM(A2:A60000)
The only thing is that it won't work if you have a circular reference stuck in there somewhere
Google is your best friend!
Sorry, I was a little unclear. I need to take all the cells that are not null
and add the number of non null cells together, not the number of all the
numbers/items in the cell. The cells are a list of film rolls and some rolls
have non numeric characters in them.
Currently I have 673 cells that have information in them letting me know I
have 673 rolls. What is the equation of macro that is used to add up all of
these non null cells in column A that will let me know the total number of
rolls I have at a glance.
-tia
"Bearacade" wrote:
>
> Just use SUM. It will add up all numeric cells...
>
> =SUM(A2:A60000)
>
> The only thing is that it won't work if you have a circular reference
> stuck in there somewhere
>
>
> --
> Bearacade
>
>
> ------------------------------------------------------------------------
> Bearacade's Profile: http://www.excelforum.com/member.php...o&userid=35016
> View this thread: http://www.excelforum.com/showthread...hreadid=563444
>
>
Tia, try subtotal(3,A1:A6000)
Greg
rc51wv wrote:
> Sorry, I was a little unclear. I need to take all the cells that are not null
> and add the number of non null cells together, not the number of all the
> numbers/items in the cell. The cells are a list of film rolls and some rolls
> have non numeric characters in them.
>
> Currently I have 673 cells that have information in them letting me know I
> have 673 rolls. What is the equation of macro that is used to add up all of
> these non null cells in column A that will let me know the total number of
> rolls I have at a glance.
>
> -tia
>
> "Bearacade" wrote:
>
> >
> > Just use SUM. It will add up all numeric cells...
> >
> > =SUM(A2:A60000)
> >
> > The only thing is that it won't work if you have a circular reference
> > stuck in there somewhere
> >
> >
> > --
> > Bearacade
> >
> >
> > ------------------------------------------------------------------------
> > Bearacade's Profile: http://www.excelforum.com/member.php...o&userid=35016
> > View this thread: http://www.excelforum.com/showthread...hreadid=563444
> >
> >
Hope this helps
Sub Film_rolls()
Dim task As Range
Dim rolls As Integer
Set task = Range("a1:a60000")
For Each cell In task
If cell.Value <> "" Then rolls = rolls + 1
Next
MsgBox " I HAVE " & rolls & " Rolls of film"
End Sub
Best N10
"rc51wv" <[email protected]> wrote in message
news:[email protected]...
> Sorry, I was a little unclear. I need to take all the cells that are not
> null
> and add the number of non null cells together, not the number of all the
> numbers/items in the cell. The cells are a list of film rolls and some
> rolls
> have non numeric characters in them.
>
> Currently I have 673 cells that have information in them letting me know I
> have 673 rolls. What is the equation of macro that is used to add up all
> of
> these non null cells in column A that will let me know the total number of
> rolls I have at a glance.
>
> -tia
>
> "Bearacade" wrote:
>
>>
>> Just use SUM. It will add up all numeric cells...
>>
>> =SUM(A2:A60000)
>>
>> The only thing is that it won't work if you have a circular reference
>> stuck in there somewhere
>>
>>
>> --
>> Bearacade
>>
>>
>> ------------------------------------------------------------------------
>> Bearacade's Profile:
>> http://www.excelforum.com/member.php...o&userid=35016
>> View this thread:
>> http://www.excelforum.com/showthread...hreadid=563444
>>
>>
that worked. and it's not Tia, it's the acronym for thanks in advance
-Will
"GregR" wrote:
> Tia, try subtotal(3,A1:A6000)
>
> Greg
> rc51wv wrote:
> > Sorry, I was a little unclear. I need to take all the cells that are not null
> > and add the number of non null cells together, not the number of all the
> > numbers/items in the cell. The cells are a list of film rolls and some rolls
> > have non numeric characters in them.
> >
> > Currently I have 673 cells that have information in them letting me know I
> > have 673 rolls. What is the equation of macro that is used to add up all of
> > these non null cells in column A that will let me know the total number of
> > rolls I have at a glance.
> >
> > -tia
> >
> > "Bearacade" wrote:
> >
> > >
> > > Just use SUM. It will add up all numeric cells...
> > >
> > > =SUM(A2:A60000)
> > >
> > > The only thing is that it won't work if you have a circular reference
> > > stuck in there somewhere
> > >
> > >
> > > --
> > > Bearacade
> > >
> > >
> > > ------------------------------------------------------------------------
> > > Bearacade's Profile: http://www.excelforum.com/member.php...o&userid=35016
> > > View this thread: http://www.excelforum.com/showthread...hreadid=563444
> > >
> > >
>
>
Will, right answer wrong name, sorry. TIA
Greg
rc51wv wrote:
> that worked. and it's not Tia, it's the acronym for thanks in advance
>
> -Will
>
> "GregR" wrote:
>
> > Tia, try subtotal(3,A1:A6000)
> >
> > Greg
> > rc51wv wrote:
> > > Sorry, I was a little unclear. I need to take all the cells that are not null
> > > and add the number of non null cells together, not the number of all the
> > > numbers/items in the cell. The cells are a list of film rolls and some rolls
> > > have non numeric characters in them.
> > >
> > > Currently I have 673 cells that have information in them letting me know I
> > > have 673 rolls. What is the equation of macro that is used to add up all of
> > > these non null cells in column A that will let me know the total number of
> > > rolls I have at a glance.
> > >
> > > -tia
> > >
> > > "Bearacade" wrote:
> > >
> > > >
> > > > Just use SUM. It will add up all numeric cells...
> > > >
> > > > =SUM(A2:A60000)
> > > >
> > > > The only thing is that it won't work if you have a circular reference
> > > > stuck in there somewhere
> > > >
> > > >
> > > > --
> > > > Bearacade
> > > >
> > > >
> > > > ------------------------------------------------------------------------
> > > > Bearacade's Profile: http://www.excelforum.com/member.php...o&userid=35016
> > > > View this thread: http://www.excelforum.com/showthread...hreadid=563444
> > > >
> > > >
> >
> >
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks