Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default telling range when to stop.


Ive got an idea about how to approach the following problem but believe
i may be going about it in the wrong way. I have many sheets in
workbook 2 that look like the following, i need to copy the raw data
from these and ignore the forecat results. With time the sheet grows
and the forecats become real values.

actual actual actual forecast forecast forecast
jan 06 feb 06 mar 06 apr 06 may 06 jun 06
jbj 1 2 3 4 5 6
guyg 4 4 4 4 4 4

like i say i only need the raw data, the approach i have thought about
would be to find the first occurence of forecast and save the column
letter(?) in a variable (var1). Then when im declaring the range i
could do something like
ActiveSheet.range(B3, var1 & "123").copy

Is there an easier way? WOuld be grateful for any advice.
Also how would i find out the letter of a column?


--
cereldine
------------------------------------------------------------------------
cereldine's Profile: http://www.excelforum.com/member.php...o&userid=32069
View this thread: http://www.excelforum.com/showthread...hreadid=532563

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default telling range when to stop.

One way:

col = Application.CountIf(Range("1:1"), "Actual") + 1
Set rng = Range(Cells(3, "B"), Cells(123, col))
MsgBox rng.Address

HTH


"cereldine" wrote:


Ive got an idea about how to approach the following problem but believe
i may be going about it in the wrong way. I have many sheets in
workbook 2 that look like the following, i need to copy the raw data
from these and ignore the forecat results. With time the sheet grows
and the forecats become real values.

actual actual actual forecast forecast forecast
jan 06 feb 06 mar 06 apr 06 may 06 jun 06
jbj 1 2 3 4 5 6
guyg 4 4 4 4 4 4

like i say i only need the raw data, the approach i have thought about
would be to find the first occurence of forecast and save the column
letter(?) in a variable (var1). Then when im declaring the range i
could do something like
ActiveSheet.range(B3, var1 & "123").copy

Is there an easier way? WOuld be grateful for any advice.
Also how would i find out the letter of a column?


--
cereldine
------------------------------------------------------------------------
cereldine's Profile: http://www.excelforum.com/member.php...o&userid=32069
View this thread: http://www.excelforum.com/showthread...hreadid=532563


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default telling range when to stop.


thats pointed me in the right direction thanks, i think i'm going to try
use the following as on further investigation i discovered every sheet
has forecase but not all have actual. Thanks again

col = (dSheet.Cells.Find("forecast").Column) - 1
Set rng = Range(Cells(10, "B"), Cells(136, col))
MsgBox rng.Address


--
cereldine
------------------------------------------------------------------------
cereldine's Profile: http://www.excelforum.com/member.php...o&userid=32069
View this thread: http://www.excelforum.com/showthread...hreadid=532563

Reply
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
Telling a website what to do!! gunny1979[_3_] Excel Programming 1 April 1st 06 04:47 AM
Telling a procedure to end Phil1982 Excel Programming 1 March 16th 06 11:58 PM
Telling the difference between zero and blank in IF statement mindfunk Excel Worksheet Functions 1 June 30th 05 06:42 PM
Telling MSGraph which cell I need KD[_3_] Excel Programming 0 June 18th 04 12:12 PM
telling Excel to go down relatively CC[_4_] Excel Programming 3 April 22nd 04 10:59 PM


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