Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Segregating Numbers According to Their Sign.
Written by Allen Wyatt (last updated January 14, 2023)
This tip applies to Excel 97, 2000, 2002, and 2003
Are you working with a large set of data consisting of mixed values, some negative and some positive, that you want to separate into columns based on their sign? There are several ways this can be approached. One method is simply to use a formula in the columns to the right of the mixed column. For instance, if the mixed column is in column A, then you could place the following formula in the cells of column B:
=IF(A2>0,A2,0)
This results in column B only containing values that are greater than zero. In column C you could then use this formula:
=IF(A2<0,A2,0)
This column would only contain values less than zero. The result is two new columns (B and C) that are the same length as the original column. Column B is essentially the same as column A, except that negative values are replaced by zero, while column C replaces positive values with zero.
If you want to end up with columns that only contain negative or positive values (no zeroes), then you can use the filtering capabilities of Excel. Assuming the mixed values are in column A, follow these steps:
Figure 1. The Advanced Filter dialog box.
You now have the desired two columns of positive and negative values. You can also delete the cells at E1:E2 if you desire.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (3198) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Segregating Numbers According to Their Sign.
Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!
When analyzing your numeric data, you may need to figure out the largest and smallest numbers in a set of values. If you ...
Discover MoreNeed a bit of help in figuring out how Excel is evaluating a particular formula? It's easy to figure out if you use the ...
Discover MoreYou can easily use the COMBIN worksheet function to determine the number of combinations that can be made from a given ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2025 Sharon Parq Associates, Inc.
Comments