Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default only total cells with $ amounts

I am trying to figiure out how to only add cells in a column that contain a
dollar amount.
EXAMPLE:

$12.00
$11.00
14.00
20.00
$10.00

$33.00 Total
Please Help

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default only total cells with $ amounts

This array* formula will do it, assuming your data is in A1:A5:

=SUM(IF(LEFT(A1:A5,1)="$",VALUE(RIGHT(A1:A5,LEN(A1 :A5)-1)),0))

Adjust the cell references to suit.

*As this is an array formula, then once you have typed it in (or
subsequently edit it) you must commit the formula with CTRL-SHIFT-ENTER
(CSE) instead of the usual ENTER. If you do this correctly then Excel
will wrap curly braces { } around the formula when viewed in the
formula bar - you must not type these yourself.

Hope this helps.

Pete

Jeffery wrote:

I am trying to figiure out how to only add cells in a column that contain a
dollar amount.
EXAMPLE:

$12.00
$11.00
14.00
20.00
$10.00

$33.00 Total
Please Help


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default only total cells with $ amounts

Pete... Thanks for the quick response, but I tried your formula and only get
a blank cell for result.
I put the test data below in cells A1:A:5 then copied and pasted your
formula into cell A:6 and comitted the formula with (CSE) the formula shows
the {} brackets but the cell result is blank.

Any Ideas??
Thanks


"Pete_UK" wrote:

This array* formula will do it, assuming your data is in A1:A5:

=SUM(IF(LEFT(A1:A5,1)="$",VALUE(RIGHT(A1:A5,LEN(A1 :A5)-1)),0))

Adjust the cell references to suit.

*As this is an array formula, then once you have typed it in (or
subsequently edit it) you must commit the formula with CTRL-SHIFT-ENTER
(CSE) instead of the usual ENTER. If you do this correctly then Excel
will wrap curly braces { } around the formula when viewed in the
formula bar - you must not type these yourself.

Hope this helps.

Pete

Jeffery wrote:

I am trying to figiure out how to only add cells in a column that contain a
dollar amount.
EXAMPLE:

$12.00
$11.00
14.00
20.00
$10.00

$33.00 Total
Please Help



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 252
Default only total cells with $ amounts

=SUMPRODUCT(--(LEFT(A1:A5,1)="$"),--(SUBSTITUTE(A1:A5,"$","")))

The cells must be formatted as text. You can check this by selecting the
cell and looking at the formula bar. If A1 ($12.00) looks like $12.00 in the
formula bar, then it is formatted as text. If A1 ($12.00) looks like 12 in
the formula bar, then it is formatted as currency. If you enter $12.00 in a
cell without first formatting it to text, then it will format the cell as
currency. To avoid this either format the cell as text before entering data,
or preced the entry with an apostrophe like this '$12.00

I'm assuming you are having trouble with Pete's formula because of this issue.

"Jeffery" wrote:

I am trying to figiure out how to only add cells in a column that contain a
dollar amount.
EXAMPLE:

$12.00
$11.00
14.00
20.00
$10.00

$33.00 Total
Please Help

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 618
Default only total cells with $ amounts

Is your $ symbol part of a text entry in the cell, or part of the
formatting?
I think Pete was expecting the former, but your results suggest the latter,
so you may need to use VBA.
--
David Biddulph

"Jeffery" wrote in message
...
Pete... Thanks for the quick response, but I tried your formula and only
get
a blank cell for result.
I put the test data below in cells A1:A:5 then copied and pasted your
formula into cell A:6 and comitted the formula with (CSE) the formula
shows
the {} brackets but the cell result is blank.

Any Ideas??
Thanks


"Pete_UK" wrote:

This array* formula will do it, assuming your data is in A1:A5:

=SUM(IF(LEFT(A1:A5,1)="$",VALUE(RIGHT(A1:A5,LEN(A1 :A5)-1)),0))

Adjust the cell references to suit.

*As this is an array formula, then once you have typed it in (or
subsequently edit it) you must commit the formula with CTRL-SHIFT-ENTER
(CSE) instead of the usual ENTER. If you do this correctly then Excel
will wrap curly braces { } around the formula when viewed in the
formula bar - you must not type these yourself.

Hope this helps.

Pete

Jeffery wrote:

I am trying to figiure out how to only add cells in a column that
contain a
dollar amount.
EXAMPLE:

$12.00
$11.00
14.00
20.00
$10.00

$33.00 Total
Please Help





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
total two cells from one worksheet to one cell in another workshee SillyLama Excel Discussion (Misc queries) 1 October 17th 06 02:40 AM
Calculating total value based on another cell's state neromadrid Excel Discussion (Misc queries) 6 October 9th 06 03:06 PM
How do I search for a total using nonadjacent cells rwfrench Excel Worksheet Functions 3 March 20th 06 02:56 AM
In several cells I have =?+423.55 I want total w/o the 423.55. lheck77 Excel Worksheet Functions 2 January 2nd 06 09:22 PM
sumproduct to add total amounts for the month Annette Excel Worksheet Functions 6 November 24th 04 03:39 PM


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