Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default referencing values in adjacent cells to selected cell

Hi gurus,

When a certain cell is selected, I want to access the values in the same
row, but a couple of columns to the left of the selected cell for inclusion
in a list box. Also, how can I create a list box on the fly using these
values that the user can select from to input into the selected cell? Any
info would be appreciated.

Thanks

DJH


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default referencing values in adjacent cells to selected cell

Darren,

First part.

ActiveCell.Offset(n,m)

where n refers to the number of rows to offset (0 is same row), and m is the
number of columns. Both n and m vcan be negative to allow for rows/columns
before.

Second part.

I would suggrest popping up a userform with a listbox, shich can be linked
to the cell.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Darren Haslett" wrote in message
u...
Hi gurus,

When a certain cell is selected, I want to access the values in the same
row, but a couple of columns to the left of the selected cell for

inclusion
in a list box. Also, how can I create a list box on the fly using these
values that the user can select from to input into the selected cell? Any
info would be appreciated.

Thanks

DJH




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 171
Default referencing values in adjacent cells to selected cell

Bob Phillips wrote:
Darren,

First part.

ActiveCell.Offset(n,m)

where n refers to the number of rows to offset (0 is same row), and m is the
number of columns. Both n and m vcan be negative to allow for rows/columns
before.


Or ActiveCell(n+1, m+1)

Alan Beban

  #4   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default referencing values in adjacent cells to selected cell

Offset worksheet function does what you need to do.

-----Original Message-----
Hi gurus,

When a certain cell is selected, I want to access the

values in the same
row, but a couple of columns to the left of the selected

cell for inclusion
in a list box. Also, how can I create a list box on the

fly using these
values that the user can select from to input into the

selected cell? Any
info would be appreciated.

Thanks

DJH


.

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
Conditional Formatting-Referencing adjacent cell cougarflank Excel Discussion (Misc queries) 5 October 9th 08 11:59 PM
Viewing selected non-adjacent cells waviking Excel Discussion (Misc queries) 3 February 23rd 08 09:53 PM
referencing selected cells [email protected] Excel Worksheet Functions 2 September 27th 06 07:22 PM
Conditional coloring of Excel cells, based on adjacent cell values? Greg Stuart Excel Worksheet Functions 0 March 10th 06 10:14 PM
SOS VBA Code Emergency: need to copy tell to empty cell direct below where values in adjacent cells in different column are equal to each other. Steven Rosenberg Excel Programming 4 August 5th 03 05:05 AM


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