Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help w/ .Range(passing searched cells) I can't do it


Hello All.. I am trying to automate my excel to run my usual charts(4 of
them). I am searching for particular information in a large file & I
want to graph the ones that I want. So i have programmed the searching
& cell finding but I cannot pass those addresses(cells ie: A1 to B50 to
graph)
Set F_cell = Cells.Find(what:="@sham_x") 'find first occurance
Set L_cell = Cells.FindPrevious(after:=ActiveCell) ' find last

Fst = F_cell.Address([ReferenceStyle:=xlA1]) 'F1 = $A$1
Lst = L_cell.Address([ReferenceStyle:=xlA1]) 'F2 = $A$50
Charts.Add
ActiveChart.ChartType = xlLineMarkers
ActiveChart.SetSourceData
Source:=Sheets("Sheet1").Range("*Fst:Lst*"), PlotBy:=xlColumns

I have to search at least 5 other catogories and graph them. I lack of
experience and reference books. All help would be greatly appreciated.

Thanks


--
osman
------------------------------------------------------------------------
osman's Profile: http://www.excelforum.com/member.php...o&userid=34226
View this thread: http://www.excelforum.com/showthread...hreadid=539819

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help w/ .Range(passing searched cells) I can't do it


osman

You have included your variable names within "" This causes Excel to
see them as a continuos string

try

ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range(Fst & ":" &
Lst), PlotBy:=xlColumns


--
mudraker
------------------------------------------------------------------------
mudraker's Profile: http://www.excelforum.com/member.php...fo&userid=2473
View this thread: http://www.excelforum.com/showthread...hreadid=539819

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
Singling out searched cells Lycean Excel Discussion (Misc queries) 1 October 26th 09 07:33 PM
passing a range from another worksheet Mike O Excel Programming 4 July 21st 05 05:09 PM
Passing a Range Jerry Excel Programming 4 February 14th 05 10:52 AM
passing range to c# Jerry Excel Programming 0 January 29th 05 08:29 PM
Passing range to subprocedure - maybe? Mike Gerbracht Excel Programming 2 July 26th 03 02:44 AM


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