COUNTIF - tracing results for further action

finnexcel

New Member
Joined
Jan 7, 2012
Messages
19
I am working from the difference between two times.

If the difference is >15 or >20 - different events occur.

I can use =COUNTIF(W:W,">0.0138888888888889") to count orders later than 20 minutes for example.

In this instance - there were 9.

But, I'd like to also return the value of column D - where the value in W is > 20mins,

I know excel knows what these rows are as the count is correct - but how can I get the Dn to return somewhere when the Wn is more than 20mins?

I hope this makes sense.
 
Finally back at work after being ill, just found this thread again.


Im really close - but the last file does not work with by (admittedly scrappy) time date

My data looks like the below - and I've copied it to the LookupTimesV2.xls 18kb file - but it still doesnt work - so am guessing its to do with my time data

have copied below attached what my time data looks like when formatted as text (in my sheet it's correctly formatted as time.

* Does the formula in the LookupTimes need changing to make it work?
* Or wont it work with my date and I need to clean/parse it somehow?

Thanks all again - Good to be back and been watching lots of 'ExcelIsFun" videos - so getting better. (if the Excel is fun guy reads this - you are my hero!)


-0.008333333
-0.00625
-0.002222222
#VALUE!
-0.007638889
-0.007638889
-0.000671296
#VALUE!
0.006608796
-0.004166667
-0.006944444
-0.002083333
-0.001388889
-0.000694444
-0.005555556
-0.007696759
-0.003472222
0.0125
-0.004166667
0.000694444
-0.011111111
-0.002083333
#VALUE!
-0.002777778
-0.004293981
-0.002777778
-0.002083333
-0.002118056
 
Upvote 0

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Finally back at work after being ill, just found this thread again.


Im really close - but the last file does not work with by (admittedly scrappy) time date

My data looks like the below - and I've copied it to the LookupTimesV2.xls 18kb file - but it still doesnt work - so am guessing its to do with my time data

have copied below attached what my time data looks like when formatted as text (in my sheet it's correctly formatted as time.

* Does the formula in the LookupTimes need changing to make it work?
* Or wont it work with my date and I need to clean/parse it somehow?

Thanks all again - Good to be back and been watching lots of 'ExcelIsFun" videos - so getting better. (if the Excel is fun guy reads this - you are my hero!)


-0.008333333
-0.00625
-0.002222222
#VALUE!
-0.007638889
-0.007638889
-0.000671296
#VALUE!
0.006608796
-0.004166667
-0.006944444
-0.002083333
-0.001388889
-0.000694444
-0.005555556
-0.007696759
-0.003472222
0.0125
-0.004166667
0.000694444
-0.011111111
-0.002083333
#VALUE!
-0.002777778
-0.004293981
-0.002777778
-0.002083333
-0.002118056
Not sure what you're asking here.

Do you want to extract all the data excluding the errors?
 
Upvote 0
Try this...

Book1
*DWXYZAA
2Data10:17_Time0:20Data2
3Data20:25_Count5Data4
4Data30:03___Data7
5Data41:11___Data9
6Data50:19___Data13
7Data60:02____
8Data71:22____
9Data80:06____
10Data90:21____
11Data100:15____
12Data110:15____
13Data120:16____
14Data130:37____
15Data140:18____
16Data150:04____
Sheet1

Enter this formula in Z3:

=COUNTIF(W:W,">"&Z2)

Enter this array formula** in AA2:

=IF(ROWS(AA$2:AA2)>Z$3,"",INDEX(D:D,SMALL(IF(W$2:W$16>Z$2,ROW(W$2:W$16)),ROWS(AA$2:AA2))))

** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.

Copy down until you get blanks.



I'd like to just have the Sheet one example you gave to work with the data I have - I know all your stuff works - it just doesn't work with my data properly.

It counts fine - and returns the right number (nine) - but cannot return the correct reference number values - I still get the NUM error.

I'm using excel 2010 - and have just copied my data into the example you had created so it should work? - But doesn't using the data I copied in last post.

Is this all correct? (that my data copied into your example, using excel 2010 should work) or am I missing something?

thanks again!

EDIT: - Have attached my ugly looking W column using the upload service thing if this helps
http://cjoint.com/12av/BDor7vd8DCd.htm
 
Last edited:
Upvote 0
I'd like to just have the Sheet one example you gave to work with the data I have - I know all your stuff works - it just doesn't work with my data properly.

It counts fine - and returns the right number (nine) - but cannot return the correct reference number values - I still get the NUM error.

I'm using excel 2010 - and have just copied my data into the example you had created so it should work? - But doesn't using the data I copied in last post.

Is this all correct? (that my data copied into your example, using excel 2010 should work) or am I missing something?

thanks again!

EDIT: - Have attached my ugly looking W column using the upload service thing if this helps
http://cjoint.com/12av/BDor7vd8DCd.htm
Ok, I downloaded the file but I don't know what I'm supposed to do with it?

There are no formulas, just a column with some #VALUE! errors, a few time values and a lot of "hash" marks because Excel won't display negative times/dates by default.

What are you wanting to do with this data?
 
Upvote 0
Sorry to be so thick.

I'd like the attached file to correctly pass along the values.

Have only pulled down the data01, data02 columns - and replaced the example times with my real list of (messy) timevalues

The count is correct :)

I just wanted it to be able to pass the correct reference from column d to column aa

(not sure why it returns Data1 in cell aa2 either?)

http://cjoint.com/12av/BDotsYcT0Al.htm
 
Upvote 0
Sorry to be so thick.

I'd like the attached file to correctly pass along the values.

Have only pulled down the data01, data02 columns - and replaced the example times with my real list of (messy) timevalues

The count is correct :)

I just wanted it to be able to pass the correct reference from column d to column aa

(not sure why it returns Data1 in cell aa2 either?)

http://cjoint.com/12av/BDotsYcT0Al.htm
OK, a couple of problems.

The count formula is referencing the ENTIRE column range while the extraction formulas were only referencing down to row 16.

Also, the extraction formulas are array formulas but were not entered as array formulas.

Array formulas are entered differently than a regular formula. After you type in a regular formula you hit the ENTER key. With an array formula you *must* use a combination of keys. Those keys are the CTRL key, the SHIFT key and the ENTER key. That is, hold down both the CTRL key and the SHIFT key then hit the ENTER key.

When done properly Excel will enclose the formula in squiggly brackets { }. You can't just type these brackets in, you *must* use the key combo to produce them. Also, anytime you edit an array formula it *must* be re-entered as an array using the key combo.

Here's your file with the updated range references in the array formulas.

Almost_There(2).xls

http://cjoint.com/?BDowjXHAlPJ

Just curious. Why are so many of the entries negatives?
 
Upvote 0

Forum statistics

Threads
1,216,110
Messages
6,128,894
Members
449,477
Latest member
panjongshing

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