Conditional or If Statement

TKC100

Board Regular
Joined
Nov 16, 2005
Messages
59
I down load a CSV file with Download and Upload speeds. I would like to be able to compute an average upload speed and an average download speed.
The file that I download is formatted such that column B read UP DN alternately down the entire column. I would attach an example but for some reason I'm not allowed. Column C is the size of the test file and column D is the actual download or upload speed expressed as a three to four digit number. Normally I would just do =AVERAGE but I need some way to sort conditionally so that I only average UP or DN from column B.
I would like to have a formula that would calculate an average for all the UP and then all the down without have to rearrange to format of the original CSV file. That is because it is quite large and is constantly being updated.
I really hope this makes sense. I think it would be very obvious it you could just see an example of the sheet.
Any help that you can provide will be greatly appreciated
Thanks!
 
You are absolutely right T. Valko I am using Excel 2002 or XP.
You too are right gehusi your work around work quite well.
Now I am going take Ruddles suggestion
A B C D
Date Type Test Size Test Score (in Kbps)
Fri Jun 17 UP 193 MB 143
Fri Jun 17 DN 2 MB 834
Thu Jun 16 UP 193 MB 120
Thu Jun 16 DN 4 MB 1346
Wed Jun 15 UP 193 MB 138
Wed Jun 15 DN 4 MB 859
Wed Jun 15 UP 193 MB 199
Wed Jun 15 DN 4 MB 376
Tue Jun 14 UP 193 MB 154
Tue Jun 14 DN 4 MB 898
Tue Jun 14 UP 193 MB 135
Tue Jun 14 DN 4 MB 802
This is an abbreviated view of my worksheet
I am now able to get an average UP and an average DN

Has anyone got an idea how to get
Max DN and Min down from the same sheet?

I can't begin to tell you all how grateful I am for you support. I could/would have spent day coming up with a workable solution.
Thanks!
Try these array formulas**.

For the max:

=MAX(IF(B2:B10="DN",D2:D10))

For the min:

=MIN(IF(B2:B10="DN",D2:D10))

** 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.
 
Upvote 0

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
I would use a DMAX Formula.

Down

=DMAX(B1:D10, "Score (in Kbps)", F1:F2))

then in a column like F1 and F2 enter
F1 - TYPE
F2 - DN

Up

=DMAX(B1:D10, "Score (in Kbps)", G1:G2))

then in a column like G1 and G2 enter
F1 - TYPE
F2 - UP


Thanks
Tigs
 
Upvote 0
T. Valko, Your suggestion worked perfectly and in order to get calculation for the Uploads I just had to change DN to UP
Also I needed to change the columns and row a bit but was surely due to my poor representation of the sheet. I am very grateful for your help. What you did was way out of my league.
Tigs81, I did not try your solution. If is working don’t mess with is my thought but thanks you as well for taking the time to assist me.
Ruddles, No, I did not put individual borders around each cell before I cut and pasted it into the message. I am glad everyone was able to make sense of it in spite of my error.
 
Upvote 0
T. Valko, Your suggestion worked perfectly and in order to get calculation for the Uploads I just had to change DN to UP
Also I needed to change the columns and row a bit but was surely due to my poor representation of the sheet. I am very grateful for your help. What you did was way out of my league.
Tigs81, I did not try your solution. If is working don’t mess with is my thought but thanks you as well for taking the time to assist me.
Ruddles, No, I did not put individual borders around each cell before I cut and pasted it into the message. I am glad everyone was able to make sense of it in spite of my error.
You're welcome. Thanks for the feedback! :cool:
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,283
Members
452,902
Latest member
Knuddeluff

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