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: 100
Default Offset based on column heading

Excel Experts,

I would like to select a range offset to the right from the original range
based on the column headings.

My spreadsheet is similar to the following


A B C D
1 Acct Entry
2
3 4J6N 15
4 4J6N 15
5 4J6N 15
6 4J6N 15
7

Set St4J6N = Cells.Find(What:="4J6N").Select

Range("A100").Select

Set End4J6N = Cells.Find(What:="4J6N", SearchOrder:=xlByColumns, _
SearchDirection:=xlPrevious)

Set rng4J6N = Range(St4J6N, End4J6N)

Set EntryS = Cells.Find(What:="Entry")

trd4J6N.Offset(, D1EntryS.Columns.Count - trd4J6N(1).Columns.Count).Select

End Sub

The final line isn't working. My goal is to select cells C3..C6.

What code will do this?

Thanks in advance.

Alan

--
achidsey
 
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
Return Column Heading based on value in row Lee New Users to Excel 2 May 21st 09 06:06 PM
Row filtering based on input box entry (column heading) Santed593 Excel Worksheet Functions 4 August 18th 05 12:35 AM
Select cells based on named Range and a column heading achidsey Excel Programming 3 August 12th 05 03:55 AM
Formatting a range based on contents of column/row heading Chris Crowe Excel Programming 0 August 20th 03 06:15 PM
Formatting a range based on contents of column/row heading Chris Excel Programming 1 August 20th 03 05:06 PM


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