View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Leith Ross[_139_] Leith Ross[_139_] is offline
external usenet poster
 
Posts: 1
Default Using a variable in a formula


Hello Noah,

This should work for you...


Dim marketvalues As Range

marketvalues = Range("A1:A" & Rows.Count).End(xlUp)

Range("B2").Formula = "=PERCENTILE(MarketValues,0.2)"


Sincerely,
Leith Ros

--
Leith Ros
-----------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...fo&userid=1846
View this thread: http://www.excelforum.com/showthread.php?threadid=48000