Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Telling a website what to do!! | Excel Programming | |||
Telling a procedure to end | Excel Programming | |||
Telling the difference between zero and blank in IF statement | Excel Worksheet Functions | |||
Telling MSGraph which cell I need | Excel Programming | |||
telling Excel to go down relatively | Excel Programming |