Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default How do I do this?

Option Explicit
Sub AllColumns()
Dim col As Long
For col = 2 To 14
OneColumn col
Next
End Sub
Sub OneColumn(col As Long)
Dim rw As Long

rw = Cells(65000, col).End(xlUp).Offset(1, 0).Row
Cells(rw, col).Value = Cells(rw, 1).Value

End Sub

HTH
Patrick Molloy
Microsoft Excel MVP

"Greg B" wrote:

I am currently writing a spreadsheet where i put numbers across a page and
they are in columns 1 to 14.

I want a code to look up the last used cell on column "g4" for example

and give me the corresponding cell on g1

I am not sure on how to word this. Hope this is clear enough

Thanks in advance

Greg



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"