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 May 15th, 2002, 08:55 PM   #1
viper
Board Regular
 
Join Date: Feb 2002
Location: Jefferson City, Missouri
Posts: 383
Default

I have two cells that contain sorta the same formula:
=sum(d9:d104) in cell h8
=Sum(E9:E104) in cell I8

the formula in cell h8 works fine, but the formula in cell i8 doesn't do anything. I get a blank(I have zero value's turned off). But if I add each cell individually(=e9+e10+e11+e12+e13+14.....+e104) it works fine and I get the total I need.

Any clues as to why? I don't really have the formula going from e9 all the way down to e104 for that would be such a pain to type. But I did run it that way down to 16.

Thanks,

__________________
I appreciate the help from everyone at Mr. Excel.

viper
viper is offline   Reply With Quote
Old May 15th, 2002, 09:03 PM   #2
Yogi Anand
MrExcel MVP
 
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
Default

Hi viper:
Click on cell I8 and look in the formula bar -- that will tell you what is actually in cell I8. If what you see in the formula bar is right, then your problem is with formatting of cell I8 -- otherwise you have a problem with the formula or with cell contents in E9:E104

Regards!
__________________
Regards!

Yogi Anand, D.Eng, P.E.
Energy Efficient Building Network LLC
www.energyefficientbuild.com
Yogi Anand is offline   Reply With Quote
Old May 15th, 2002, 09:23 PM   #3
Anne Troy
MrExcel MVP
 
Anne Troy's Avatar
 
Join Date: Feb 2002
Location: Allentown, PA
Posts: 2,510
Default

Sometimes, numbers go weird on us. By using the + sign, you could be setting them straight with Excel. Using Sum doesn't *set them straight*, but you can try this:

Put a 1 in any cell.
Select that cell and copy it.
Select all the numbers that aren't working right.
Hit Edit-Paste special, Multiply, OK.

This forces a mathematical formula on the data, which forces Excel to see it as numbers, without changing the numbers themselves.



Could be your formula, but it could be this stupid anomoly too.
__________________
~Anne Troy
Anne Troy is offline   Reply With Quote
Old May 15th, 2002, 09:27 PM   #4
viper
Board Regular
 
Join Date: Feb 2002
Location: Jefferson City, Missouri
Posts: 383
Default

I don't know what is going on. I think I may have mentioned the wrong columns but anyway, I tried to format the cells in column c as $1.00, then I tried to format column d as $1.00 but it won't format it that way all it does is give me 1.00. When I click on the cell and look in the formula bar in column d I see 1.00 but in column c i see 1. Can I force it to format the cells the same way as in C? I've never run into this before.

thanks,

__________________
I appreciate the help from everyone at Mr. Excel.

viper
viper is offline   Reply With Quote
Old May 15th, 2002, 09:27 PM   #5
Juan Pablo González
MrExcel MVP
 
Join Date: Feb 2002
Location: Bogota, Colombia
Posts: 11,927
Default

In the same line as Dreamboat, select your lookalike numbers, go to Data, Text to Columns, hit finish.

Your formula should now work !
__________________
Regards,

Juan Pablo González
http://www.juanpg.com
Juan Pablo González is offline   Reply With Quote
Old May 15th, 2002, 09:30 PM   #6
viper
Board Regular
 
Join Date: Feb 2002
Location: Jefferson City, Missouri
Posts: 383
Default

Thanks everyone, it is working now. Sorry for the other reply, I wasn't logged in and only read one of the replies. Thanks again.


__________________
I appreciate the help from everyone at Mr. Excel.

viper
viper is offline   Reply With Quote
Old May 15th, 2002, 10:24 PM   #7
viper
Board Regular
 
Join Date: Feb 2002
Location: Jefferson City, Missouri
Posts: 383
Default

Thanks again for your help but now I have another problem. Everytime my macro runs it messes up the cell it just inserted and I have to do Juan's suggestion in order to get the Sum to work for that cell. Any suggestions?

Here is the code I am using.
Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
ActiveSheet.Unprotect ("password")
If Not IsNumeric(TextBox1) Then
MsgBox "Need a Number"
TextBox1.SetFocus
Exit Sub
End If
Dim c
For Each c In Range("CodeRange")

Debug.Print c.Value
If c.Value = Val(TextBox1) Then
If Cells(c.Row, 4) <> "" Then
Cells(c.Row + 1, 4).Rows.EntireRow.Insert
Cells(c.Row + 1, 4) = TextBox4
Range("e9").Copy
Range("e10:e130").Select
Selection.PasteSpecial Paste:=xlFormulas
Range("e9").Select
Else
Cells(c.Row, 4) = TextBox4
End If
Exit For
End If
Next


If TextBox1.Value < 1 And TextBox1.Value > 85 Then
MsgBox "Range 1 to 85"
TextBox1.SetFocus
Exit Sub
End If
ActiveSheet.Protect ("password")
Sheets("Invoice listing").Activate
NextRow = _
Application.WorksheetFunction.CountA(Range("A:A")) + 1
ActiveSheet.Unprotect ("password")
Cells(NextRow, 1) = TextBox5.Value
Cells(NextRow, 2) = TextBox4.Value
ActiveSheet.Protect ("password")
Sheets("Sheet1").Activate
Unload UserForm1
End Sub

Thanks,
__________________
I appreciate the help from everyone at Mr. Excel.

viper
viper 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 -4. The time now is 11:19 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
All contents Copyright 1998-2012 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