Basic math question

L

Legacy 352679

Guest
Wondering if someone can help me find the most efficient way to figure out a really basic math brain fart I'm having.

Column H has wind speed data.
Column I has the degrees the wind is blowing in.
Column J has the respective wind direction as N, NNE, NE, ENE etc.

How can I group wind speeds together (i.e. 0-10, 10.1-20 etc) to find out the percentage of direction. So, what percentage of wind between 0-10 is blowing N, what percentage of wind between 10.1-20 is blowing N, what percentage of wind between 0-10 is blowing east etc.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
I created this example for you.
Cell Formulas
RangeFormula
I2I2=COUNT(H5:H34)
H5:H34H5=RANDBETWEEN(0,70)
I5:I34I5=RANDBETWEEN(0,359.9999)
J5:J34J5=VLOOKUP(I5,$L$5:$M$20,2,1)
P5:T20P5=COUNTIFS($J$5:$J$34,$O5,$H$5:$H$34,">="&P$4,$H$5:$H$34,"<"&Q$4)/$I$2
U5:U20U5=COUNTIFS($J$5:$J$34,$O5,$H$5:$H$34,">="&U$4)/$I$2
V5:V20V5=SUM(P5:U5)
P21:U21P21=SUM(P5:P20)
V21V21=SUM(P5:U20)
L6:L20L6=L5+45/2
 
Upvote 0
Oh, that looks immensely helpful! When our servers are back up at work I will give this a thorough look. But thank you so much for starting me in the right direction!
 
Upvote 0
G'day @DRSteele,

Edit: I've actually just changed the formula to specify a range rather than a cell value. This works for me now, but if there is a way to make it read from a cell value I would be interested in learning ?

I've finally had a chance to write up everything in a spreadsheet.

Just a follow up question.

With the range in P4:U4 (0, 10, 20 etc), is it possible to change these values to a range itself? I.e. 0-2, 2.01-10, 10.01-14 etc? I've tried doing this but unfortunately it affects the entire table as it no longer recognises those values.

I'll likely seek some help in doing this in VBA but if I can nail your table, then at least I'll have the core setup.

Thank you.
 
Last edited by a moderator:
Upvote 0
Well, those ranges you try to put in are just text. The table is working on GREATERTHANOREQUALTO lower number, LESSTHAN upper number. You could put a text field that concatenates that data so that it reads as you wish.

As for VBA I know diddly. I'm trying to figure out how to catch the attention of a VBA expert here.
 
Upvote 0
Well, those ranges you try to put in are just text. The table is working on GREATERTHANOREQUALTO lower number, LESSTHAN upper number. You could put a text field that concatenates that data so that it reads as you wish.

As for VBA I know diddly. I'm trying to figure out how to catch the attention of a VBA expert here.
Yea I think I'm going to have to play around with it a little bit, but by simply changing the formula to read a value rather than a cell, I've managed to get it working nicely (as the 0 - 2 would be used as a title for a wind rose, which is the only reason why I would have it like that).

But thank you for doing all the leg work. It's saved me a lot of time and frustration.
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,257
Members
449,075
Latest member
staticfluids

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