LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 259
Default A little help needed please...

Hi all

For some reason I can't see the forest through the trees in this If,
Then, Next code...

Sub UpdateYear()
Dim sCell As Range
Dim tCell As Range
Dim i As Integer
For i = 1 To 5
Set sCell = Range("A1:A5")
Set tCell = Range("B1:B5")
If Not Cells(i, tCell) = "" Then
Cells(i, tCell).Value = Cells(i, sCell)
Cells(i, tCell).NumberFormat = "YYYY"
End If
Next i
End Sub

As always

TIA
Mick
 
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
Deleting Rows With Non-Needed Data between Needed Data Daren Excel Worksheet Functions 2 September 30th 08 06:47 PM
sum(if...) help needed! Jarek Excel Discussion (Misc queries) 3 March 11th 08 07:48 PM
VBA help needed please paul[_17_] Excel Programming 1 July 17th 07 06:05 PM
More help needed :-( ChrisMattock Excel Worksheet Functions 5 June 28th 06 01:03 PM
Help needed Michael168[_12_] Excel Programming 1 October 2nd 03 05:44 PM


All times are GMT +1. The time now is 05:18 AM.

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"