Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Special Copy, Paste Special macro


I need a macro button that will, on selection, evaluate if a cell from
A39:A79 contains the text "Not Locked" and then will change all the
corresponding formulas in those rows for columns B:I (B39:I79) into text
(i.e. Their formula values: Copy Paste Special Paste Values).

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Special Copy, Paste Special macro


The below works on the activesheet ..Try and feedback..

Sub Macro1()
Dim varData As Variant
If WorksheetFunction.CountIf(Range("A39:A79"), "*Not Locked*") 0 Then
varData = Range("B39:I79")
Range("B39:I79").Value = varData
End If
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"usmc-r70" wrote:

I need a macro button that will, on selection, evaluate if a cell from
A39:A79 contains the text "Not Locked" and then will change all the
corresponding formulas in those rows for columns B:I (B39:I79) into text
(i.e. Their formula values: Copy Paste Special Paste Values).

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Special Copy, Paste Special macro


Try the code as following.

Dim rng As Range
For Each rng In Range("A39:A79 ")
If rng.Value = "Not Locked" Then
Range("B" & rng.Row & ":I" & rng.Row).Value = Range("B" &
rng.Row & ":I" & rng.Row).Value
End If
Next rng


"usmc-r70" ...
I need a macro button that will, on selection, evaluate if a cell from
A39:A79 contains the text "Not Locked" and then will change all the
corresponding formulas in those rows for columns B:I (B39:I79) into text
(i.e. Their formula values: Copy Paste Special Paste Values).



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Special Copy, Paste Special macro


Your code did exactly what I needed, thanks.

"Á÷À˵ÄË«Óã" wrote:

Try the code as following.

Dim rng As Range
For Each rng In Range("A39:A79 ")
If rng.Value = "Not Locked" Then
Range("B" & rng.Row & ":I" & rng.Row).Value = Range("B" &
rng.Row & ":I" & rng.Row).Value
End If
Next rng


"usmc-r70" ...
I need a macro button that will, on selection, evaluate if a cell from
A39:A79 contains the text "Not Locked" and then will change all the
corresponding formulas in those rows for columns B:I (B39:I79) into text
(i.e. Their formula values: Copy Paste Special Paste Values).




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
Macro for Edit/Copy/Paste Special icanlearn Excel Worksheet Functions 4 July 17th 08 06:54 PM
Copy & Paste Special Macro Secret Squirrel Excel Discussion (Misc queries) 3 January 27th 07 02:15 AM
Copy Paste Special Macro Bud Hughes Excel Discussion (Misc queries) 2 August 31st 05 02:00 AM
Dynamic Copy/Paste Special Formulas/Paste Special Values Sharon Perez Excel Programming 3 August 7th 04 09:49 PM
Need help with creating a special copy and paste macro Shawn[_8_] Excel Programming 4 July 12th 04 09:15 PM


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