MrExcel Message Board


Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old Mar 24th, 2002, 05:07 AM   #1
Riki
 
Join Date: Mar 2002
Posts: 2
Default

I have a list of rainfall data, ie

1.4
0.6
*0.2

How do I sum these three lines to get 2.2?
An * would normally only preceed the odd small number 0.8 and below.

Tks


Riki is offline   Reply With Quote
Old Mar 24th, 2002, 05:26 AM   #2
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 40,551
Default

Quote:
On 2002-03-23 23:07, Riki wrote:
I have a list of rainfall data, ie

1.4
0.6
*0.2

How do I sum these three lines to get 2.2?
An * would normally only preceed the odd small number 0.8 and below.

Tks
Riki,

Array-enter:

=SUM(IF(LEFT(A1:A3)="*",MID(A1:A3,2,LEN(A1:A3))+0,(A1:A3)+0))

where A1:A3 houses the values of interest.

To array-enter a formula, you need to hit control+shift+enter at the same time, not just enter.

Aladin
Aladin Akyurek is offline   Reply With Quote
Old Mar 24th, 2002, 05:47 AM   #3
Riki
 
Join Date: Mar 2002
Posts: 2
Default

Tks Aladin for your prompt reply.
You're always a wealth of information!

Cheers
Riki is offline   Reply With Quote
Old Mar 24th, 2002, 06:34 AM   #4
Dave Hawley
Banned
 
Join Date: Mar 2002
Posts: 1,582
Default

Hi Rick


It is not godd practice to mix text and numbers when you really need a number. Array formulas are also a step in the wrong direction.

Just Custom Format your cell(s) that you want to show a * with the number as:
"*"0.0

This way you will see *0.2 but its true value will be 0.2 and you can use a normal SUM function.



_________________
Kind Regards
Dave Hawley
OzGrid Business Applications
Microsoft Excel/VBA Training


[ This Message was edited by: Dave Hawley on 2002-03-24 00:35 ]
Dave Hawley is offline   Reply With Quote
Old Mar 24th, 2002, 07:29 AM   #5
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 40,551
Default

Eagerness to "wage war" makes one sloppy.

It would have been a good advice to posit:

Custom format the column in which you enter the rainfall readings as

[<=0.8]"*"0.0;General

and you will be able to use the ordinary SUM worksheet function.

But, not as custom format cell by cell, abusing user time:

"*"0.0

or the whole column unless one wants the whole column to show stars preceeding all numbers.

A side note. Why didn't I suggest this in my first reply? The rule I follow if it matters to know: Accept the user's routines (in tis case) of data entry if that does not conflict with the proccessing requirements. The cost of a single cell array-formula to sum starred and unstarred entries is definitely a "quantitée négligeable" set off against breaking a user routine. This consideration shows up clearly when users insist of entering (start and end) times as 2245, 0300, etc. instead of 22:45, 03:00, etc.

Aladin

[ This Message was edited by: Aladin Akyurek on 2002-03-24 01:40 ]
Aladin Akyurek is offline   Reply With Quote
Old Mar 24th, 2002, 08:25 AM   #6
Dave Hawley
Banned
 
Join Date: Mar 2002
Posts: 1,582
Default

>Eagerness to "wage war" makes one sloppy

I'm very sorry you feel that way Aladin, but That's really your problem not mine.


No big deal applying a custom format when you have the "Format painter"


While one or only a few arrays will have no real adverse effect it really is very bad advise. You will certainly not realise it Aladin but I have been sent many an unusable spreadsheet which are due to poor advise about using arrays. When I ask why they allowed this to happen, they all say the same "I didn't realise!".

Aladin, my idea of helping is not a 'glossy cover' approach, which is all arrays are in most cases.

RE: Why didn't I suggest this in my first reply?
You, I and most others reading this thread can patently see this reason. )






Dave Hawley is offline   Reply With Quote
Old Mar 24th, 2002, 12:43 PM   #7
Yogi Anand
MrExcel MVP
 
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,448
Default

Hi Aladin and Dave:
I feel fortunate that I am able to participate in this forum -- different approaches, personal preferences, pros & cons of different approaches, pitfalls, and new discoveries and all ...
So please keep enligtening us with different viewpoints withoust being defensive about it because if you will hold back your viewpoint you would deny us viewers the benefit of your invaluable insights and experiences...
With GREETINGS and REGARDS!
__________________
Regards!

Yogi Anand, D.Eng, P.E.
Energy Efficient Building Network LLC
www.energyefficientbuild.com
Yogi Anand is offline   Reply With Quote
Old Mar 24th, 2002, 12:52 PM   #8
Dave Hawley
Banned
 
Join Date: Mar 2002
Posts: 1,582
Default

Yogi,

Gotta say, I agree.


Dave Hawley is offline   Reply With Quote
Old Mar 24th, 2002, 12:57 PM   #9
Yogi Anand
MrExcel MVP
 
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,448
Default

Quote:
On 2002-03-23 23:07, Riki wrote:
I have a list of rainfall data, ie

1.4
0.6
*0.2

How do I sum these three lines to get 2.2?
An * would normally only preceed the odd small number 0.8 and below.

Tks
Hi Rikki:
Aladin and Dave have already posted valuable approaches to your inquiry...
I have a question for you -- do I understand it right that rainfall under 0.8" will be preceded with an * (I realize you do have a vague qualifier in your writing) -- the reason I mention this is that Aladin gave you a formula that will flag all rainfall entries below 0.8" with an *, whereas Dave gave you an option to format entries selectively to be marked with *.

If you go with Aladin's suggested approach, your entries will be displayed as

1.4
*0.6
*0.2
Total rainfall 2.2

Why was 0.6 entry in your post not get preceded with an * ... JUST CURIOUS!

__________________
Regards!

Yogi Anand, D.Eng, P.E.
Energy Efficient Building Network LLC
www.energyefficientbuild.com
Yogi Anand is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT +1. The time now is 03:36 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
All contents Copyright 1998-2009 by MrExcel Consulting.
diabetic desserts recipes recipes Diabetic Soups Holiday Pizza Recipes Popcorn Recipes Recipes For Microwave Pasta Recipes Casserole Recipes Chili Recipes Curry Recipes Crockpot Recipes Apples Recipes Bread Recipes Vegetarian Recipes Vegetable recipes Desserts Recipes Appetizers Ethnic Recipes Meat Dishes Barbecue Recipes Sauces Recipes Marinade Recipes Low Fat Recipes Frugal Gourmet Kitchen Classics Recipes On The Grill Cook Books Seafood Recipes Cajun Recipes Breads Low Fat Low Fat Breads Bread Machine Recipes Yeast Breads Quick Breads Fat Free Vegetarian Salad Recipes Eggplant Recipes Radish Recipes Tomato Recipes Jalapeno Recipes Potato Recipes Lettuce Recipes Cabbage Recipes Beans Ambrosia Recipes Biscotti Recipes Desserts Low Fat Cookie Recipes Cheesecake Recipes Cake Recipes Pie Recipes Muffin Recipes Custard Recipes Best Appetizers Appetizers Low Fat Salsa Recipes Dip Recipes International Recipes Afghan Recipes Alaska Recipes French Recipes German Recipes Greek Recipes Italian Recipes Spanish Recipes Thai Recipes Korean Recipes Chinese Recipes Mexican Recipes Indian Recipes Beef Recipes Pork Pork & Ham Pork Butts Pork Chop Recipes Pork Ribs Rulled Pork Poultry Recipes Stews Recipes Ground Beef Barbecue Grill Barbecue Smoker All Purpose Sauce BBQ Sauce Barbecue Sauce Carolina BBQ Sauce Pickle Recipes Marinades Smoking Low Fat Appetizers & Dips Low Fat Breakfast Low Fat Cakes Low Fat Cheesecakes Low Fat Cookies Low Fat Desserts Low Fat Fish & Seafood Low Fat Meats Low Fat Pasta Low Fat Pies Low Fat Salads Low Fat Sandwiches Low Fat Sauces & Condiments Low Fat Sides Low Fat Soups Low Fat Vegetarian Baker's Dozen Taste of Home Recipe Book Bon Appetit Cookbook Blacktie Cookbook Buster Cook Book Cookbook USA Cook Book Cook Book Sara's Cookbook Sara's Cookbook Appetizers and Dips Poultry recipes Diabetic recipes Holiday recipes Miscellaneous recipes 110 recipes 1986 Usenet cookbook 2900 recipes Cyberrealm recipes Great sysops of world Specialty recipes Ceideburg recipes Cheese recipes Chili recipes Fruits recipes Garlic recipes Great chefs of NY Londontowne recipes Raisins recipes Recipes for kids US Food Vegetarian recipes Bread recipes Drinks Meat Dishes Brisket recipes Caribou recipes Chicken recipes Filet mignons recipes Pork recipes Swordfish recipes Turkey recipes Pasta recipes Uncategorized recipes Ethnic recipes Canada recipes English recipes Ethiopia recipes Germany recipes Greece recipes Mexican recipes Philippines recipes Welsh recipes Microwave recipes Soups recipes Vegetable recipes Asparagus recipes Barley recipes Brown rice recipes Lentil recipes Mushrooms recipes Salads recipes Wild rice Desserts recipes Cakes recipes Chocolate recipes Cookies recipes Ice cream recipes