LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 114
Default Offsetting to identify value in header row

Amazing thanks Rick.
I'm new to VBA (and programming in general) and must say I find this
group a real help.

I learning quickly though. I had not even considered using the column
number and .end commands.

I used the following code in the end as I had an issue where the
startdate was a in a cell ajoined to another part of the table so the
xltoright missed the startdate and went to the end date: -


identify startdate
For Each R In Range("D4:D1000")
For Each c In Range(R.Offset(0, 4), R.Offset(0, 147))
If Not c.Value = "" Then
R.Value = Cells(3, c.Column).Value
Exit For
Else
End If
Next c
Next R

identify Enddate
For Each R In Worksheets("Monday").Range("E4:E1000")
R.Value = Cells(3, Cells(R.Row, Worksheets("Monday"). _
Columns.Count).End(xlToLeft).Column + 1).Value
Next

Many thanks again,
Matt
 
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
Offsetting Dan Wood Excel Discussion (Misc queries) 3 March 3rd 10 03:23 PM
identify sheet number in header? Steve Excel Discussion (Misc queries) 5 December 9th 08 12:29 AM
How Do I Identify 1 to 1 Offsetting Entries in a List? [email protected] Excel Programming 3 October 6th 06 11:38 PM
Offsetting a varible?? Ashley Milford via OfficeKB.com Excel Programming 5 June 2nd 05 03:38 PM
Identify Cell by Column Header and ID in Col A (Track Changes) Bettergains Excel Programming 1 April 4th 05 01:33 PM


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