Hello guys,
I am ranking stocks using VBA rather than excel. In my dataset, I have 1 column of figures and some NAs, this I want to use percentrank to sort these numbers, ignoring NA. I can do is in excel using =PERCENTRANK.INC(IF(ISNUMBER(Column), column, ""), the target cell). However, it does not work in VBA when I copy it. Can you guys help me out?
Thank you so much
I am ranking stocks using VBA rather than excel. In my dataset, I have 1 column of figures and some NAs, this I want to use percentrank to sort these numbers, ignoring NA. I can do is in excel using =PERCENTRANK.INC(IF(ISNUMBER(Column), column, ""), the target cell). However, it does not work in VBA when I copy it. Can you guys help me out?
Rich (BB code):
monthlydata.Columns(4).Cells(i).Value = WorksheetFunction.PercentRank_Inc(IIf(IsNumber(monthlydata.Columns(3)), monthlydata.Columns(3), ""), monthlydata.Columns(3).Cells(i))
Thank you so much