Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Question about ).End(xlToRight)

In the line below what does End(xlToRight) mean?

wbk1.Sheets(1).Cells(i, j) _ = wbk2.Sheets(1).Cells.Find _
(SEARCHKEY).End(xlToRight)

If there a way to change "End(xlToRight)" in this line to
mean the cell at the same row as the found cell but in the very next column?

Any help would be appreciated.

Bob


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 340
Default Question about ).End(xlToRight)

Bob, end(xltoright) does the same thing as presing the End key and the right
arrow.

To specify one cell to the right use .Offset(0,1)

Bob Flanagan
Macro Systems
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel


"Bob Benjamin" wrote in message
...
In the line below what does End(xlToRight) mean?

wbk1.Sheets(1).Cells(i, j) _ = wbk2.Sheets(1).Cells.Find _
(SEARCHKEY).End(xlToRight)

If there a way to change "End(xlToRight)" in this line to
mean the cell at the same row as the found cell but in the very next

column?

Any help would be appreciated.

Bob




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Question about ).End(xlToRight)

wbk1.Sheets(1).Cells(i, j).Value = _
wbk2.Sheets(1).Cells.Find _
(SEARCHKEY).Offset(0,1)

End(xltoRight) would be the same as hitting end and right arrow from the
found cell.

Where it ends up would depend on what in the cells to the right.

--
Regards,
Tom Ogilvy



Bob Benjamin wrote in message
...
In the line below what does End(xlToRight) mean?

wbk1.Sheets(1).Cells(i, j) _ = wbk2.Sheets(1).Cells.Find _
(SEARCHKEY).End(xlToRight)

If there a way to change "End(xlToRight)" in this line to
mean the cell at the same row as the found cell but in the very next

column?

Any help would be appreciated.

Bob




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 135
Default Question about ).End(xlToRight)

On my computer, .End(xlToRight) works the same as

[crtl + right-arrow]

Whereas

[End + right-arrow]

works the same as

[right-arrow]

by itself.

Regards,
Shockley



"Tom Ogilvy" wrote in message
...
wbk1.Sheets(1).Cells(i, j).Value = _
wbk2.Sheets(1).Cells.Find _
(SEARCHKEY).Offset(0,1)

End(xltoRight) would be the same as hitting end and right arrow from the
found cell.

Where it ends up would depend on what in the cells to the right.

--
Regards,
Tom Ogilvy



Bob Benjamin wrote in message
...
In the line below what does End(xlToRight) mean?

wbk1.Sheets(1).Cells(i, j) _ = wbk2.Sheets(1).Cells.Find _
(SEARCHKEY).End(xlToRight)

If there a way to change "End(xlToRight)" in this line to
mean the cell at the same row as the found cell but in the very next

column?

Any help would be appreciated.

Bob






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Question about ).End(xlToRight)

Maybe I didn't speak clearly. I didn't say End + right arrow, I said end
and right arrow which I admit is ambiguous. Hit the end key and release it
then hit right arrow (and release it).

thats why the command is end(xltoRight)

Now that may match Ctrl+right arrow, with the ctrl key held down, but this
didn't seem to inspire the name the command to be ctrl(xltoright), so End,
then right arrow is probably a more meaningful explanation.

thanks for bringing the ambiguity to my attention.

--
Regards,
Tom Ogilvy

shockley wrote in message
...
On my computer, .End(xlToRight) works the same as

[crtl + right-arrow]

Whereas

[End + right-arrow]

works the same as

[right-arrow]

by itself.

Regards,
Shockley



"Tom Ogilvy" wrote in message
...
wbk1.Sheets(1).Cells(i, j).Value = _
wbk2.Sheets(1).Cells.Find _
(SEARCHKEY).Offset(0,1)

End(xltoRight) would be the same as hitting end and right arrow from the
found cell.

Where it ends up would depend on what in the cells to the right.

--
Regards,
Tom Ogilvy



Bob Benjamin wrote in message
...
In the line below what does End(xlToRight) mean?

wbk1.Sheets(1).Cells(i, j) _ = wbk2.Sheets(1).Cells.Find _
(SEARCHKEY).End(xlToRight)

If there a way to change "End(xlToRight)" in this line to
mean the cell at the same row as the found cell but in the very next

column?

Any help would be appreciated.

Bob










  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 135
Default Question about ).End(xlToRight)

Thanks for clarifying. I've never seen that before where a key stroke
influences the effect of the following key stroke--but I think I like it!

Regards,
Shockley

Well, glad I asked! I have never before come across a case where a key
stroke influences the effect of the next key stroke.
"Tom Ogilvy" wrote in message
...
Maybe I didn't speak clearly. I didn't say End + right arrow, I said end
and right arrow which I admit is ambiguous. Hit the end key and release

it
then hit right arrow (and release it).

thats why the command is end(xltoRight)

Now that may match Ctrl+right arrow, with the ctrl key held down, but this
didn't seem to inspire the name the command to be ctrl(xltoright), so

End,
then right arrow is probably a more meaningful explanation.

thanks for bringing the ambiguity to my attention.

--
Regards,
Tom Ogilvy

shockley wrote in message
...
On my computer, .End(xlToRight) works the same as

[crtl + right-arrow]

Whereas

[End + right-arrow]

works the same as

[right-arrow]

by itself.

Regards,
Shockley



"Tom Ogilvy" wrote in message
...
wbk1.Sheets(1).Cells(i, j).Value = _
wbk2.Sheets(1).Cells.Find _
(SEARCHKEY).Offset(0,1)

End(xltoRight) would be the same as hitting end and right arrow from

the
found cell.

Where it ends up would depend on what in the cells to the right.

--
Regards,
Tom Ogilvy



Bob Benjamin wrote in message
...
In the line below what does End(xlToRight) mean?

wbk1.Sheets(1).Cells(i, j) _ = wbk2.Sheets(1).Cells.Find _
(SEARCHKEY).End(xlToRight)

If there a way to change "End(xlToRight)" in this line to
mean the cell at the same row as the found cell but in the very next
column?

Any help would be appreciated.

Bob










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
Excel 2007 Macro/VB Question DDE Question MadDog22 Excel Worksheet Functions 1 March 10th 10 01:47 AM
where can I see my question and answer? Yesterday I ask a question IP Excel Discussion (Misc queries) 2 May 10th 08 04:08 PM
Question [email protected] Excel Discussion (Misc queries) 7 September 13th 06 09:47 PM
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM
The question is an excel question that I need to figure out howto do in excel. Terry Excel Worksheet Functions 3 January 23rd 06 06:22 PM


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