View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Select Far Right data in a Selected Row

I assume you mean with code and not formulas?

Dim rng as Range
set rng = Range("DX21")
if isempty(rng) then
set rng = rng.End(xltoLeft)
end if
if rng.Column = 4 then
Range("B21").Value = rng.Value
else
Msgbox "Range of interest is empty"
End if

--
Regards,
Tom Ogilvy




"tmony" wrote:


I am very new to Macro's but am trying to modify an existing one inside
a spreadsheet I have to update.

What I have to do is select a range of cells in one row, i.e. D21:DX21.
I want to take the data from the farthest right cell in that range that
contains data, and place that value in B21.

Hopefully this is a simple request!!

Thanks in advance for any help I can get!


--
tmony
------------------------------------------------------------------------
tmony's Profile: http://www.excelforum.com/member.php...o&userid=28966
View this thread: http://www.excelforum.com/showthread...hreadid=537773