Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Daz Daz is offline
external usenet poster
 
Posts: 7
Default Extracting row data from a range

Hi all.

I'm new to excel VBA programming (I'm an old hand at Access VBA) and
I'm trying to do the following:

1. I have a range of eight cells (E8:N8).
2. When I double click on a cell in that range, it changes its interior
colour, and set the interior colour of every other cell within the
range to 'blank'.

I have this working fine for this individual range. What I have is
multiple ranges - eg.

(E8:N8)
(E9:N9)
(E10:N10)

...and I need to extract the row number of a particular cell when it
double clicked, then using that row value, only 'blank' out the colour
of cells with a range intersecting with that row number. i.e. Click on
cell F10, the all cells in the range E10 to N10 are set to blank, then
F10 is highlighted. So basically, I just need to know how to get the
row value.

I cannot find any examples on the web, and was wondering if anyone
could help out?

Regards
Daz

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default Extracting row data from a range

To get the activecell row .....

ActiveCell.Row

Also note you can refer to range using

Range(Cells(r1, c1), Cells(r2, c2))

or a single cell as....

Cells(r3, c3) = 1

Where r1 and c1 etc are the row and column numbers. A method that allows you
to loop through using vars to point to the cells-range required

--
Cheers
Nigel



"Daz" wrote in message
ups.com...
Hi all.

I'm new to excel VBA programming (I'm an old hand at Access VBA) and
I'm trying to do the following:

1. I have a range of eight cells (E8:N8).
2. When I double click on a cell in that range, it changes its interior
colour, and set the interior colour of every other cell within the
range to 'blank'.

I have this working fine for this individual range. What I have is
multiple ranges - eg.

(E8:N8)
(E9:N9)
(E10:N10)

..and I need to extract the row number of a particular cell when it
double clicked, then using that row value, only 'blank' out the colour
of cells with a range intersecting with that row number. i.e. Click on
cell F10, the all cells in the range E10 to N10 are set to blank, then
F10 is highlighted. So basically, I just need to know how to get the
row value.

I cannot find any examples on the web, and was wondering if anyone
could help out?

Regards
Daz



  #3   Report Post  
Posted to microsoft.public.excel.programming
Daz Daz is offline
external usenet poster
 
Posts: 7
Default Extracting row data from a range


Nigel wrote:
To get the activecell row .....

ActiveCell.Row

Also note you can refer to range using

Range(Cells(r1, c1), Cells(r2, c2))

or a single cell as....

Cells(r3, c3) = 1

Where r1 and c1 etc are the row and column numbers. A method that allows you
to loop through using vars to point to the cells-range required

--
Cheers
Nigel



"Daz" wrote in message
ups.com...
Hi all.

I'm new to excel VBA programming (I'm an old hand at Access VBA) and
I'm trying to do the following:

1. I have a range of eight cells (E8:N8).
2. When I double click on a cell in that range, it changes its interior
colour, and set the interior colour of every other cell within the
range to 'blank'.

I have this working fine for this individual range. What I have is
multiple ranges - eg.

(E8:N8)
(E9:N9)
(E10:N10)

..and I need to extract the row number of a particular cell when it
double clicked, then using that row value, only 'blank' out the colour
of cells with a range intersecting with that row number. i.e. Click on
cell F10, the all cells in the range E10 to N10 are set to blank, then
F10 is highlighted. So basically, I just need to know how to get the
row value.

I cannot find any examples on the web, and was wondering if anyone
could help out?

Regards
Daz


  #4   Report Post  
Posted to microsoft.public.excel.programming
Daz Daz is offline
external usenet poster
 
Posts: 7
Default Extracting row data from a range

For some reason, my previous reply didnt wrok.

Thats for your assistance - worked a charm.

Darragh

Nigel wrote:
To get the activecell row .....

ActiveCell.Row

Also note you can refer to range using

Range(Cells(r1, c1), Cells(r2, c2))

or a single cell as....

Cells(r3, c3) = 1

Where r1 and c1 etc are the row and column numbers. A method that allows you
to loop through using vars to point to the cells-range required

--
Cheers
Nigel



"Daz" wrote in message
ups.com...
Hi all.

I'm new to excel VBA programming (I'm an old hand at Access VBA) and
I'm trying to do the following:

1. I have a range of eight cells (E8:N8).
2. When I double click on a cell in that range, it changes its interior
colour, and set the interior colour of every other cell within the
range to 'blank'.

I have this working fine for this individual range. What I have is
multiple ranges - eg.

(E8:N8)
(E9:N9)
(E10:N10)

..and I need to extract the row number of a particular cell when it
double clicked, then using that row value, only 'blank' out the colour
of cells with a range intersecting with that row number. i.e. Click on
cell F10, the all cells in the range E10 to N10 are set to blank, then
F10 is highlighted. So basically, I just need to know how to get the
row value.

I cannot find any examples on the web, and was wondering if anyone
could help out?

Regards
Daz


  #5   Report Post  
Posted to microsoft.public.excel.programming
Daz Daz is offline
external usenet poster
 
Posts: 7
Default Extracting row data from a range

For some reason, my previous reply didnt wrok.

Thats for your assistance - worked a charm.

Darragh

Nigel wrote:
To get the activecell row .....

ActiveCell.Row

Also note you can refer to range using

Range(Cells(r1, c1), Cells(r2, c2))

or a single cell as....

Cells(r3, c3) = 1

Where r1 and c1 etc are the row and column numbers. A method that allows you
to loop through using vars to point to the cells-range required

--
Cheers
Nigel



"Daz" wrote in message
ups.com...
Hi all.

I'm new to excel VBA programming (I'm an old hand at Access VBA) and
I'm trying to do the following:

1. I have a range of eight cells (E8:N8).
2. When I double click on a cell in that range, it changes its interior
colour, and set the interior colour of every other cell within the
range to 'blank'.

I have this working fine for this individual range. What I have is
multiple ranges - eg.

(E8:N8)
(E9:N9)
(E10:N10)

..and I need to extract the row number of a particular cell when it
double clicked, then using that row value, only 'blank' out the colour
of cells with a range intersecting with that row number. i.e. Click on
cell F10, the all cells in the range E10 to N10 are set to blank, then
F10 is highlighted. So basically, I just need to know how to get the
row value.

I cannot find any examples on the web, and was wondering if anyone
could help out?

Regards
Daz


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
Extracting data from large range abe1952 Excel Discussion (Misc queries) 3 November 4th 09 01:05 AM
Extracting the data according the number of cell (at specific range) wilchong via OfficeKB.com New Users to Excel 3 May 16th 08 04:57 AM
Extracting the data according the number of cell (at specific range) wilchong via OfficeKB.com New Users to Excel 0 May 15th 08 05:24 AM
Extracting/deleting select data from range of cell DipyDawg Excel Discussion (Misc queries) 4 May 6th 08 06:48 PM
looping thru range extracting data based on character gtslabs[_2_] Excel Programming 0 October 11th 06 10:41 PM


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