View Single Post
  #9   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions,microsoft.public.excel.worksheetfunctions
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default How to get last entered value in a ROW?

Hi Excelwiz

Sub test()
ActiveSheet.Range("c1").Value = ActiveSheet.Cells(15, Columns.Count).End(xlToLeft).Value
End Sub

Alt-F11
InsertModule from the menubar
paste the sub in there
Alt-Q to go back to Excel

If you do Alt-F8 you get a list of your macro's
Select "test" and press Run


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Excelwiz wanabee" wrote in message .. .
Ron - please excuse my ignorance but where do I paste that into?

Bill

"Ron de Bruin" wrote in message
...
Try this to get the last value of row 15

ActiveSheet.Cells(15, Columns.Count).End(xlToLeft).Value

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Excelwiz wanabee" wrote in message

.. .
Hi,

I'm wondering if ya'll excel "wizards" can help me out. I want to be

able to
get the "last entered" value for a particular row and subtract from it a
fixed field (i.e. L15-F15 where L15 is the last entered value (or G15,

H15,
etc.; increments monthly) and F15 is a field that does not change in the
equation.)

Thanks,

Bill