Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 563
Default Sumif Format Equals

Excel stores dates as serial numbers. The date 1/1/2009 has value 39814.
So if each of your money values are below that value, you could use
=SUMIF(A:A,"<39814")

Alternatively you could use a helper column. In B1 (or some other column far
to the right, and maybe hidden) enter =CELL("format",A1), copy down the
column. Cells with dates will have formats of Dn (where n is a digit) while
cells formatted to show 2 decimal places will have F2, while those with
currency format will have C2. Very odd: a long date such as 1 January 2010
seems to have format G (general) - I am using Excel 2010 beta

To sum currency formatted cell: =SUMIF(B1:B100,"C2",A1:A100)

Note: the CELL function is not volatile so if you reformat a cell the
formula will not update until the worksheet is next recalculated. You can
force this with F9.

If the helper column is not acceptable, maybe someone with give you a VBA
solution.
best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme

"Starbuck82" wrote in message
...
I have both dates and currency in the same column. How do I sum the
column
based on format of the cell? Specifically, how do I sumif only the cells
containing currency?


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
Sumif formula that uses "contains" rather than "equals" jerrymcm Excel Discussion (Misc queries) 4 October 2nd 07 05:15 PM
If a cell equals _, at the next row that equals _, return value fr CathyH Excel Worksheet Functions 10 May 2nd 07 07:53 PM
if a:a (range) equals january and c:c equals gas then add g:g ($) BCOz Excel Worksheet Functions 4 December 29th 05 07:40 PM
custom filter does not work when selecting 'equals' X AND 'equals' plindman Excel Discussion (Misc queries) 1 June 1st 05 11:29 PM
how to write 'not equals blank' criteria in SUMIF David Excel Worksheet Functions 6 May 7th 05 05:57 PM


All times are GMT +1. The time now is 09:23 AM.

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

About Us

"It's about Microsoft Excel"