excel - MEDIANIF formula using months -


I have written the following "MEDIANIF" array formula to give average (percent return) values ​​to column B in column A The months are consistent. In other words, I want the middle of all prices according to January, February, March, etc. ...

This formula works fully for all months except January. I have manually verified that it is working fine for all other months, but for any reason, it gives it 0 for now. It is not a formatting issue or anything like that (everything is formatted continuously). I can not understand why it will not work for January for my life.

  = MEDIAN (if (month (data! $ A $ 4: $ A $ 65536) = 1, data! $ B $ 4: $ B $ 65536))  < / Pre> 

I will post an image, but this is my first post and till I have at least 10 reputation, I can not post!

Data passes in calendar B is arranged in calendar months (last business day of the month) and percentage return in column B (formatted as one percent).

Any help is greatly appreciated!

Excel will cure empty cells in the form of zero (in this way formula , At least) and zero will be considered as a date in January (January 1900) so that zero in the calculation of average in any blank lines will be contributed by zero; So you get wrong results - Add another test to make sure the cells are not empty, that is,

= MEDIAN (if (data! $ A $ 4: $ A $ 65536) << "", if (month (data! $ A $ 4: $ A $ 65536) = 1, data! $ B $ 4: $ B $ 65536)))

Alternatively, you can limit the formula in the rows with the data - maybe you employ dynamic named ranges if the quantity of data is


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -