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 7th, 2002, 09:23 AM   #1
EBK
New Member
 
Join Date: Apr 2002
Location: Paul, Sydney Australia
Posts: 10
Default

I need to create a formula that will remove blank cells from a list sorted in a column. I saw the link to chips excellent site web page and he has a formula there but will not work in my sheet I require it in. I also have this formula that was given to me:
=IF(SMALL(IF(PRINT="",999,(1+ROW(PRINT)-MIN(ROW(PRINT)))),1+ROW(PRINT)-MIN(ROW(PRINT)))=999,"",INDEX(PRINT,SMALL(IF(PRINT="",999,(1+ROW(PRINT)-MIN(ROW(PRINT)))),1+ROW(PRINT)-MIN(ROW(PRINT))))) entered as an array.
whereprint is the name of the cell range that i wish the blank cells to be removed from.

Chips formula he shows is:

=IF(ROW()-ROW(NoBlanksRange)+1>ROWS(BlanksRange)-COUNTBLANK(BlanksRange),"",INDIRECT(ADDRESS(SMALL((IF(BlanksRange<>"",ROW(BlanksRange),ROW()+ROWS(BlanksRange))),ROW()-ROW(NoBlanksRange)+1),COLUMN(BlanksRange),4))) entered as an array.
Chips formula would be easily copied over but i require the coloumn range to be greater in length, chips is approx 15 cells deep and i require mine to be min 35 cells deep in a coloumn(currently the data appears in a coloumn but can be arranged into a row if another formula structure would work better)

I get the first cell in my list blank and the remainding cells all have #NUM! in them when i try entering chips formula as an array. I have made sure that the array range equals the length of the source range and that it is directly beside it as well and out of the way of any surrounding data that may be deleted by rows. I tried variables to entering and cell range names and nothing different happens. Chips formula works fine when I downloaded it so I don't think it would have anything to do with my program or settings of excel. I am also running excel97.

Thanks

Paul


[ This Message was edited by: EBK on 2002-05-07 08:31 ]
EBK is offline   Reply With Quote
Old May 7th, 2002, 09:33 AM   #2
EBK
New Member
 
Join Date: Apr 2002
Location: Paul, Sydney Australia
Posts: 10
Default

Thanks to anyone who can help, I forgot to add this before I submitted it.

Sincerely,

Paul
EBK is offline   Reply With Quote
Old May 7th, 2002, 09:48 AM   #3
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,316
Default

I need to create a formula that will remove blank cells from a list sorted in a column.

Paul,

What do you mean by "sorted"? In a sorted column would blanks sink to the bottom of the list.

Aladin
Aladin Akyurek is offline   Reply With Quote
Old May 8th, 2002, 02:49 AM   #4
EBK
New Member
 
Join Date: Apr 2002
Location: Paul, Sydney Australia
Posts: 10
Default

This list is for eg:

Coloumn c15:c50

in c15 would be a number or letter arrangement. then in c16 there would be another entry but c17 would be blank. The cells in that range would be filled in randomly and I would like to have all the top cells filled with the data and the bottom cells blank so there is no blank cell in between two cells with data in them. I do not know vba and have only dealt with formulas with excel.

Thanks

Paul
EBK is offline   Reply With Quote
Old May 8th, 2002, 03:39 AM   #5
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,316
Default

Quote:
On 2002-05-08 01:49, EBK wrote:
This list is for eg:

Coloumn c15:c50

in c15 would be a number or letter arrangement. then in c16 there would be another entry but c17 would be blank. The cells in that range would be filled in randomly and I would like to have all the top cells filled with the data and the bottom cells blank so there is no blank cell in between two cells with data in them. I do not know vba and have only dealt with formulas with excel.

Thanks

Paul
And, you don't want to sort the target range?

Aladin

Aladin Akyurek is offline   Reply With Quote
Old May 8th, 2002, 07:46 PM   #6
EBK
New Member
 
Join Date: Apr 2002
Location: Paul, Sydney Australia
Posts: 10
Default

If it is possible yes, but the target range i want sorted is filled with formulas. The formulas in the target range bring information from another sheet to the target range. It only brings what is already in the other sheet and doesn't alter the data. For e.g. sheet 1 has data in random order from a1:a45 sheet two has the target range c5:c49 with the same data from sheet 1 a1:a45 with a "if" formula nested with a vlookup formula that brings the data across if there is something in it for a particular student for eg:

c5 in the target range would have =IF(VLOOKUP($C$14,sheet1$A$7:$AH$421,5,FALSE)=0,"",IF(VLOOKUP($C$14,sheet1$A$7:$AH$421,5,FALSE)="y","3"))

so c6 in the target range would have exactly the same except a 6 where the 5 is in the vlookup formulas, and the 3 would be changed to a 4 at the end of the formula.

where c14 in sheet 2 would have a student number entered, sheet1 a7:ah421 would have the list of student numbers, 5 is the first coloumn that the class list runs along a row in, "3" at the end is the class code and if there is a yes in the box then the class code they are doing is brought over into the target range in vertical coloumn order in sheet 2.

so i would get a vertical list with spaces between the classes a student would be doing and would like to have the classes they are doing at the top of the target range, so if it can be done directly from gathering the info from sheet 1's data that would be great to.

Thanks alot

Paul
EBK 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 01: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