Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Btobin0
 
Posts: n/a
Default Search from highlighted cell

I have a macro where I can search from A1 but I would like to search from
anywhere in the sheet. Does anyone know how to do that?
  #2   Report Post  
Posted to microsoft.public.excel.misc
C01d
 
Posts: n/a
Default Search from highlighted cell


Instead of using Range("A1") in your code, use ActiveSheet.UsedRange.
This property represents the currently selected range in your
worksheet.


--
C01d
------------------------------------------------------------------------
C01d's Profile: http://www.excelforum.com/member.php...o&userid=34422
View this thread: http://www.excelforum.com/showthread...hreadid=546352

  #3   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Search from highlighted cell

Actually, Selection would refer to the current selected range.

Activesheet.usedrange refers to what the range that excel thinks has been used.

C01d wrote:

Instead of using Range("A1") in your code, use ActiveSheet.UsedRange.
This property represents the currently selected range in your
worksheet.

--
C01d
------------------------------------------------------------------------
C01d's Profile: http://www.excelforum.com/member.php...o&userid=34422
View this thread: http://www.excelforum.com/showthread...hreadid=546352


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Search from highlighted cell

In the .find statement

..., After:=activecell, ...

or specify whatever cell you want to use.



Btobin0 wrote:

I have a macro where I can search from A1 but I would like to search from
anywhere in the sheet. Does anyone know how to do that?


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
Btobin0
 
Posts: n/a
Default Search from highlighted cell

you have a period at the end of used range. is there more to it?

"Dave Peterson" wrote:

In the .find statement

..., After:=activecell, ...

or specify whatever cell you want to use.



Btobin0 wrote:

I have a macro where I can search from A1 but I would like to search from
anywhere in the sheet. Does anyone know how to do that?


--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.misc
Btobin0
 
Posts: n/a
Default Search from highlighted cell

ok here is my code snippet. I am trying to get the A1 turned to the
activesheet.used range. How do I set this up?

Workbooks.Open Filename:= _
"http://total." & Sheet1.Range("a1") & "." & Sheet1.Range("A1") & ".htm"

"Btobin0" wrote:

you have a period at the end of used range. is there more to it?

"Dave Peterson" wrote:

In the .find statement

..., After:=activecell, ...

or specify whatever cell you want to use.



Btobin0 wrote:

I have a macro where I can search from A1 but I would like to search from
anywhere in the sheet. Does anyone know how to do that?


--

Dave Peterson

  #7   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Search from highlighted cell

I don't understand how this fits into a Search. I guessed you were doing the
same thing as Edit|Find in code.

Maybe you could restate your question.

Btobin0 wrote:

ok here is my code snippet. I am trying to get the A1 turned to the
activesheet.used range. How do I set this up?

Workbooks.Open Filename:= _
"http://total." & Sheet1.Range("a1") & "." & Sheet1.Range("A1") & ".htm"

"Btobin0" wrote:

you have a period at the end of used range. is there more to it?

"Dave Peterson" wrote:

In the .find statement

..., After:=activecell, ...

or specify whatever cell you want to use.



Btobin0 wrote:

I have a macro where I can search from A1 but I would like to search from
anywhere in the sheet. Does anyone know how to do that?

--

Dave Peterson


--

Dave Peterson
  #8   Report Post  
Posted to microsoft.public.excel.misc
Btobin0
 
Posts: n/a
Default Search from highlighted cell

Right now Ihae it wher in the code below, if information is added to A1 then
it will fil out the rest of this web link and then run a macro to copy and
paste. I want A1 to be any cell in the worksheet.

"Dave Peterson" wrote:

I don't understand how this fits into a Search. I guessed you were doing the
same thing as Edit|Find in code.

Maybe you could restate your question.

Btobin0 wrote:

ok here is my code snippet. I am trying to get the A1 turned to the
activesheet.used range. How do I set this up?

Workbooks.Open Filename:= _
"http://total." & Sheet1.Range("a1") & "." & Sheet1.Range("A1") & ".htm"

"Btobin0" wrote:

you have a period at the end of used range. is there more to it?

"Dave Peterson" wrote:

In the .find statement

..., After:=activecell, ...

or specify whatever cell you want to use.



Btobin0 wrote:

I have a macro where I can search from A1 but I would like to search from
anywhere in the sheet. Does anyone know how to do that?

--

Dave Peterson


--

Dave Peterson

  #9   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Search from highlighted cell

How do you know what cell to process? Is it the activecell?

Workbooks.Open Filename:= _
"http://total." & activecell.value & "." & activecell.value & ".htm"

(Did you really want that value duplicated?)

Btobin0 wrote:

Right now Ihae it wher in the code below, if information is added to A1 then
it will fil out the rest of this web link and then run a macro to copy and
paste. I want A1 to be any cell in the worksheet.

"Dave Peterson" wrote:

I don't understand how this fits into a Search. I guessed you were doing the
same thing as Edit|Find in code.

Maybe you could restate your question.

Btobin0 wrote:

ok here is my code snippet. I am trying to get the A1 turned to the
activesheet.used range. How do I set this up?

Workbooks.Open Filename:= _
"http://total." & Sheet1.Range("a1") & "." & Sheet1.Range("A1") & ".htm"

"Btobin0" wrote:

you have a period at the end of used range. is there more to it?

"Dave Peterson" wrote:

In the .find statement

..., After:=activecell, ...

or specify whatever cell you want to use.



Btobin0 wrote:

I have a macro where I can search from A1 but I would like to search from
anywhere in the sheet. Does anyone know how to do that?

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
  #10   Report Post  
Posted to microsoft.public.excel.misc
Btobin0
 
Posts: n/a
Default Search from highlighted cell

unfortunately, that is how the web content was setup. not my choice, I just
have to work with it.

"Dave Peterson" wrote:

How do you know what cell to process? Is it the activecell?

Workbooks.Open Filename:= _
"http://total." & activecell.value & "." & activecell.value & ".htm"

(Did you really want that value duplicated?)

Btobin0 wrote:

Right now Ihae it wher in the code below, if information is added to A1 then
it will fil out the rest of this web link and then run a macro to copy and
paste. I want A1 to be any cell in the worksheet.

"Dave Peterson" wrote:

I don't understand how this fits into a Search. I guessed you were doing the
same thing as Edit|Find in code.

Maybe you could restate your question.

Btobin0 wrote:

ok here is my code snippet. I am trying to get the A1 turned to the
activesheet.used range. How do I set this up?

Workbooks.Open Filename:= _
"http://total." & Sheet1.Range("a1") & "." & Sheet1.Range("A1") & ".htm"

"Btobin0" wrote:

you have a period at the end of used range. is there more to it?

"Dave Peterson" wrote:

In the .find statement

..., After:=activecell, ...

or specify whatever cell you want to use.



Btobin0 wrote:

I have a macro where I can search from A1 but I would like to search from
anywhere in the sheet. Does anyone know how to do that?

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson

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
Compiling macro based on cell values simonsmith Excel Discussion (Misc queries) 1 May 16th 06 08:31 PM
Using Vlookup in a string search of a cell Ralph Heidecke Excel Worksheet Functions 1 April 26th 06 06:46 PM
Drawn lines paste anywhere not on highlighted cell Miss P Excel Discussion (Misc queries) 0 December 30th 05 03:47 PM
up to 7 functions? ALex Excel Worksheet Functions 10 April 12th 05 06:42 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 07:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"