LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 68
Default use current cell address as beginning of macro

Hi,

How can I use the active cell address as a part of a macro.

I want to use the column heading (which is a part of a file name) to
copy certain fields from the corresonding file into the column where
the active cell is at.

This is what I've got:

Sub test()

Sht = "1) Other Income"

With Worksheets(Sht)

FR = 14 'FirstRow
LR = 25 'LastRow
COL = "W" 'Column
Cno = 11
Cnm = Cno + 1

.Range(COL & FR & ":" & COL & LR).Formula = "=+'J:\Year End\Year
End 2008\Disclosure Packs\[" & Range(COL & Cnm).Value & " - " &
Range(COL & Cno).Value & " FY08 REPORTING PACK.xls]" & Sht & "'!F" &
FR

End With

End Sub

Cheers,

Harold
 
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to run relative to current selected cell MahD Excel Discussion (Misc queries) 3 December 11th 06 06:18 AM
Referncing the current cell name in an Excel MACRO Doug Excel Discussion (Misc queries) 1 December 8th 06 03:59 AM
Get cell address from macro function argument oscar New Users to Excel 3 June 1st 06 01:23 AM
Goto a dynamic cell address within a macro blkane Excel Discussion (Misc queries) 3 June 8th 05 07:08 PM
Help Pls re macro cell address Hugh Jago Excel Discussion (Misc queries) 2 January 5th 05 09:01 PM


All times are GMT +1. The time now is 11:32 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"