LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default Change code by code. Can you do that?

iYr = Year(Sheets("Sheet1").Range("C16")
If iYr = 2007 Then aCol = "B"
If iYr = 2008 Then aCol = "D"
LastCell = Worksheets("Main").Cells(Rows.Count, aCol).End(xlUp).Row

Merjet


 
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
How do I change this code? OrlaLynch Excel Discussion (Misc queries) 1 June 11th 08 03:06 PM
Can I use code/macro to change code/macro in an existing file? Scott Bedows Excel Programming 2 February 14th 07 05:50 AM
change code keri Excel Programming 2 December 20th 06 12:47 PM
Code Conflicts With Worksheet Change Code Paige Excel Programming 3 March 3rd 06 04:25 PM
VB CODE RUN ON DDE VALUE CHANGE Frank Kabel Excel Programming 1 April 1st 04 08:31 PM


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