Formula and function help required urgently

John.F

New Member
Joined
Sep 26, 2011
Messages
7
I have a spreadsheet with 2 columns with 200 rows, to which I have assigned range names thus:

A1:A200=Track
B1:B200=Data

Cells in Track column have 3 possible values which are "Track 1", "Track 2", "Track 3"
Cells in Data column have numeric values which could be negative (displayed as "-##"), or positive (displayed as "##"). The range of values could be from -451 to 366. So far, all is good

I need to have the following COUNTED values in separate cells in column C:

Total Number of rows with any value entries in both ranges
Total Rows with "Track 1" in Track
Total Rows with "Track 2" in Track
Total Rows with "Track 3" in Track
Total Rows with "0" in Data
Total Rows with positive values in Data
Total Rows with Negative values in Data
Total rows with value between "1" and "91" in Data for any track value
Total rows with value "-181" to "-360" in data for any Track value

I have tried using the count functions including COUNTIF() and COUNTIFS() to no avail - I keep getting #NAME, or #VALUE errors or 0 results when I can see data in the cells referenced and even when I get a non-error or non-zero result, it is incorrect - i.e. 17 when there are only 5 actual data values in the range counted. I am not a beginner with Excel, but I have not used Excel 2010 before this week - and so far, it looks like these functions work differently to 2007 or earlier, or to how John Walkenbach has written about them in "Excel 2010 Formulas" book. I'm stumped and have run out of time to complete this project successfully.

Can anyone help ?

Thanks,

John.F
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Here is part of your solution.

Look at SUMPRODUCT and CountIF and CountIFs

Excel Workbook
ABCDE
1TrackDataTracksTotal
2Track 123Track 1126
3Track 245Track 2124
4Track 36Track 396
5Track 178
6Track 212Total Zero2
7Track 30
8Track 1-9
9Track 20
10Track 378
11Track 134
12Track 267
13Track 312
Sheet1
 
Upvote 0
Hi Trevor,

Thanks for the reply. Maybe I didn't explain properly - what I am looking for is not the sum of the values, but the count of instances where values are between a and b in the data column.

But thanks for your reply... It gave me an idea on how to fix another area of the same workbook!

Cheers,

John.F
 
Upvote 0
Further info:

Total Number of rows with any value entries in both ranges - Working
Total Rows with "Track 1" in Track - Working
Total Rows with "Track 2" in Track - Working
Total Rows with "Track 3" in Track - Working
Total Rows with "0" in Data - Working
Total Rows with only positive values in Data - Not Working
Total Rows with Negative values in Data - Not Working
Total rows with value between "1" and "91" in Data for any track value - Not Working
Total rows with value "-181" to "-360" in data for any Track value - Not Working

Cheers

John.F
 
Upvote 0
John try these,

Excel Workbook
ABCDE
1TrackDataTotal
2Track 123>011
3Track 2451
4Track 36>09
5Track 178Between -181 -360
6Track 212
7Track 30
8Track 1-9
9Track 20
10Track 378
11Track 134
12Track 267
13Track 312
Sheet2
 
Upvote 0

Forum statistics

Threads
1,214,924
Messages
6,122,294
Members
449,077
Latest member
Rkmenon

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top