View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Find last used cell in row with blanks inbetween

Hi Les

Try this then

Dim LastValueCol As Integer
LastValueCol = Cells(1, Columns.Count).End(xlToLeft).Column
Cells(1, LastValueCol + 1).Formula = "=SUM(R1C2:R1C" & LastValueCol & ")"


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Les Stout" wrote in message ...
I'm sorry, i do not think i explained myself very well !!
What i need to do is the following:

A B C D E F G H I J

bp 20.23 12.32 12.32 12.36 15.23

I need to start in A at "bp" and go to "H" and put in a calculation to
add the row up giving me the total of the row = B1:G1.

Hopefully this is clearer



Les Stout

*** Sent via Developersdex http://www.developersdex.com ***