Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Formula for selecting highlighted cells only

Is there a formula I can use to capture only highlighted cells in a row?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Formula for selecting highlighted cells only

What do you mean by "capture"? You can process each cell in a selection this
way...

Dim C As Range
For Each C In Selection
' Your code for each cell in selection would go here
Debug.Print C.Address, C.Value
Next

In the above example, the code will print out (in the Immediate window) the
address and value for each cell currently selected.

Rick


"Joey" wrote in message
...
Is there a formula I can use to capture only highlighted cells in a row?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Formula for selecting highlighted cells only

It's the results from a Conditional format. I now have a column of 5000
records with some highlighted and would like to move those highlighted cells
into another column.



"Rick Rothstein (MVP - VB)" wrote:

What do you mean by "capture"? You can process each cell in a selection this
way...

Dim C As Range
For Each C In Selection
' Your code for each cell in selection would go here
Debug.Print C.Address, C.Value
Next

In the above example, the code will print out (in the Immediate window) the
address and value for each cell currently selected.

Rick


"Joey" wrote in message
...
Is there a formula I can use to capture only highlighted cells in a row?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Formula for selecting highlighted cells only

Ah, I mistook what you meant by "highlighted". There are two approaches that
can be taken here... either examine the range, in code, for cells which meet
the criteria (formula) you used in your Conditional Format or examine the
cells for the specific format that was actually applied. Either way, you
need to tell us the formula/criteria you used in the Conditional Format and
also the specific formatting you applied.

Rick


"Joey" wrote in message
...
It's the results from a Conditional format. I now have a column of 5000
records with some highlighted and would like to move those highlighted
cells
into another column.



"Rick Rothstein (MVP - VB)" wrote:

What do you mean by "capture"? You can process each cell in a selection
this
way...

Dim C As Range
For Each C In Selection
' Your code for each cell in selection would go here
Debug.Print C.Address, C.Value
Next

In the above example, the code will print out (in the Immediate window)
the
address and value for each cell currently selected.

Rick


"Joey" wrote in message
...
Is there a formula I can use to capture only highlighted cells in a
row?




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Formula for selecting highlighted cells only

Formula is - =COUNTIF($A$1:$B$3395,B12)1



"Rick Rothstein (MVP - VB)" wrote:

Ah, I mistook what you meant by "highlighted". There are two approaches that
can be taken here... either examine the range, in code, for cells which meet
the criteria (formula) you used in your Conditional Format or examine the
cells for the specific format that was actually applied. Either way, you
need to tell us the formula/criteria you used in the Conditional Format and
also the specific formatting you applied.

Rick


"Joey" wrote in message
...
It's the results from a Conditional format. I now have a column of 5000
records with some highlighted and would like to move those highlighted
cells
into another column.



"Rick Rothstein (MVP - VB)" wrote:

What do you mean by "capture"? You can process each cell in a selection
this
way...

Dim C As Range
For Each C In Selection
' Your code for each cell in selection would go here
Debug.Print C.Address, C.Value
Next

In the above example, the code will print out (in the Immediate window)
the
address and value for each cell currently selected.

Rick


"Joey" wrote in message
...
Is there a formula I can use to capture only highlighted cells in a
row?






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Formula for selecting highlighted cells only

I also selected a lavendor color to highlight the cells with

"Joey" wrote:

Formula is - =COUNTIF($A$1:$B$3395,B12)1



"Rick Rothstein (MVP - VB)" wrote:

Ah, I mistook what you meant by "highlighted". There are two approaches that
can be taken here... either examine the range, in code, for cells which meet
the criteria (formula) you used in your Conditional Format or examine the
cells for the specific format that was actually applied. Either way, you
need to tell us the formula/criteria you used in the Conditional Format and
also the specific formatting you applied.

Rick


"Joey" wrote in message
...
It's the results from a Conditional format. I now have a column of 5000
records with some highlighted and would like to move those highlighted
cells
into another column.



"Rick Rothstein (MVP - VB)" wrote:

What do you mean by "capture"? You can process each cell in a selection
this
way...

Dim C As Range
For Each C In Selection
' Your code for each cell in selection would go here
Debug.Print C.Address, C.Value
Next

In the above example, the code will print out (in the Immediate window)
the
address and value for each cell currently selected.

Rick


"Joey" wrote in message
...
Is there a formula I can use to capture only highlighted cells in a
row?




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Formula for selecting highlighted cells only

That is probably the easier one to work with.

Dim C As Range
For Each C In Range("A1:B3395")
If .Cells.Interior.ColorIndex = ## Then
' Your code for each cell in selection would go here
Debug.Print C.Address, C.Value
End If
Next

Replace the ## above with the actual ColorIndex number used for you lavender
color. If you are not sure of the ColorIndex that is being used for it, get
VB to tell you. Make a mental note of the address for one of your cells that
is colored with this lavender color, let's say for this example, that A1 is
lavender colored. Go to the VB editor and execute this in the Immediate
window...

? Range("A1").Cells.Interior.ColorIndex

VB will print out the ColorIndex number it is using for that lavender
color... replace the ## in my code with that number.

Rick


"Joey" wrote in message
...
I also selected a lavendor color to highlight the cells with

"Joey" wrote:

Formula is - =COUNTIF($A$1:$B$3395,B12)1



"Rick Rothstein (MVP - VB)" wrote:

Ah, I mistook what you meant by "highlighted". There are two approaches
that
can be taken here... either examine the range, in code, for cells which
meet
the criteria (formula) you used in your Conditional Format or examine
the
cells for the specific format that was actually applied. Either way,
you
need to tell us the formula/criteria you used in the Conditional Format
and
also the specific formatting you applied.

Rick


"Joey" wrote in message
...
It's the results from a Conditional format. I now have a column of
5000
records with some highlighted and would like to move those
highlighted
cells
into another column.



"Rick Rothstein (MVP - VB)" wrote:

What do you mean by "capture"? You can process each cell in a
selection
this
way...

Dim C As Range
For Each C In Selection
' Your code for each cell in selection would go here
Debug.Print C.Address, C.Value
Next

In the above example, the code will print out (in the Immediate
window)
the
address and value for each cell currently selected.

Rick


"Joey" wrote in message
...
Is there a formula I can use to capture only highlighted cells in
a
row?





  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Formula for selecting highlighted cells only

Thank you very much!

"Rick Rothstein (MVP - VB)" wrote:

That is probably the easier one to work with.

Dim C As Range
For Each C In Range("A1:B3395")
If .Cells.Interior.ColorIndex = ## Then
' Your code for each cell in selection would go here
Debug.Print C.Address, C.Value
End If
Next

Replace the ## above with the actual ColorIndex number used for you lavender
color. If you are not sure of the ColorIndex that is being used for it, get
VB to tell you. Make a mental note of the address for one of your cells that
is colored with this lavender color, let's say for this example, that A1 is
lavender colored. Go to the VB editor and execute this in the Immediate
window...

? Range("A1").Cells.Interior.ColorIndex

VB will print out the ColorIndex number it is using for that lavender
color... replace the ## in my code with that number.

Rick


"Joey" wrote in message
...
I also selected a lavendor color to highlight the cells with

"Joey" wrote:

Formula is - =COUNTIF($A$1:$B$3395,B12)1



"Rick Rothstein (MVP - VB)" wrote:

Ah, I mistook what you meant by "highlighted". There are two approaches
that
can be taken here... either examine the range, in code, for cells which
meet
the criteria (formula) you used in your Conditional Format or examine
the
cells for the specific format that was actually applied. Either way,
you
need to tell us the formula/criteria you used in the Conditional Format
and
also the specific formatting you applied.

Rick


"Joey" wrote in message
...
It's the results from a Conditional format. I now have a column of
5000
records with some highlighted and would like to move those
highlighted
cells
into another column.



"Rick Rothstein (MVP - VB)" wrote:

What do you mean by "capture"? You can process each cell in a
selection
this
way...

Dim C As Range
For Each C In Selection
' Your code for each cell in selection would go here
Debug.Print C.Address, C.Value
Next

In the above example, the code will print out (in the Immediate
window)
the
address and value for each cell currently selected.

Rick


"Joey" wrote in message
...
Is there a formula I can use to capture only highlighted cells in
a
row?






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
Including cells that are highlighted in a formula Robin Excel Discussion (Misc queries) 4 December 30th 09 09:23 PM
Selecting/Editing highlighted cells in Excel Carol330 Excel Discussion (Misc queries) 2 August 21st 09 08:11 PM
Selecting multiple cells, I can't see the cells highlighted ET Excel Discussion (Misc queries) 1 August 1st 08 03:20 PM
selecting highlighted cells llorente Excel Discussion (Misc queries) 2 November 27th 07 05:08 PM
Cells referenced in formula bar not highlighted in worksheet squall Excel Discussion (Misc queries) 1 October 5th 06 11:10 PM


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

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"