#1   Report Post  
uobt
 
Posts: n/a
Default HELP.

i need a vba script that will select any cell interiorcolor = 36
and then copy special paste value?

  #2   Report Post  
Don Guillett
 
Posts: n/a
Default

Help is a lousy subject line and your explanation leaves a lot to mind read
over. Could you try again.

--
Don Guillett
SalesAid Software

"uobt" wrote in message
oups.com...
i need a vba script that will select any cell interiorcolor = 36
and then copy special paste value?



  #3   Report Post  
John Mansfield
 
Posts: n/a
Default

UOBT,

Try something like this . . .

Sub CopyData()
Dim Rng As Range
For Each Rng In Range("A1", "A10")
If Rng.Interior.ColorIndex = 36 Then
Rng.Copy
Rng.Offset(0, 2).PasteSpecial Paste:=xlPasteValues
End If
Next Rng
End Sub

You will need to change the copy destination to fit your needs.

----
Regards,
John Mansfield
http://www.pdbook.com


"uobt" wrote:

i need a vba script that will select any cell interiorcolor = 36
and then copy special paste value?


  #4   Report Post  
Don Guillett
 
Posts: n/a
Default

or

for each c in selection
if c.interior.colorindex=36 then c.formula = c.value
next c

--
Don Guillett
SalesAid Software

"John Mansfield" wrote in message
...
UOBT,

Try something like this . . .

Sub CopyData()
Dim Rng As Range
For Each Rng In Range("A1", "A10")
If Rng.Interior.ColorIndex = 36 Then
Rng.Copy
Rng.Offset(0, 2).PasteSpecial Paste:=xlPasteValues
End If
Next Rng
End Sub

You will need to change the copy destination to fit your needs.

----
Regards,
John Mansfield
http://www.pdbook.com


"uobt" wrote:

i need a vba script that will select any cell interiorcolor = 36
and then copy special paste value?




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



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