Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
TR TR is offline
external usenet poster
 
Posts: 11
Default Macro to Cut and paste Values

I have a workbook with many lookups to external workbooks via function.
INDIERCT.EXT This works fine.....but is very slow; as it cycles every
associated file everytime I open my workbook (there could be 1000's).

In Column P (titled) Complete? A "Y" or "N" indicates status of any given
ROW of data. If the status is "Y" then I can eliminate the Formulas and
Hopefully significantly increase my speed of the workbook.

So what I am looking for is a Macro that will Scan the workseet and
whereever it finds a "Y" in Column P...it will COPY and PASTE SPECIAL VALUES
(for that row, columns A-U, I would like to keep whatever formulas that are
after Column U active).

My worksheet name is "ACTIVE ECO's" if that helps.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Macro to Cut and paste Values

Try this small macro:

Sub noformulas()
Dim i As Long, n As Long
n = Cells(Rows.Count, "P").End(xlUp).Row
For i = 1 To n
If Cells(i, "P").Value = "Y" Then
Set r = Range("A" & i & ":U" & i)
r.Copy
r.PasteSpecial Paste:=xlPasteValues
End If
Next
End Sub

--
Gary''s Student - gsnu201003


"tr" wrote:

I have a workbook with many lookups to external workbooks via function.
INDIERCT.EXT This works fine.....but is very slow; as it cycles every
associated file everytime I open my workbook (there could be 1000's).

In Column P (titled) Complete? A "Y" or "N" indicates status of any given
ROW of data. If the status is "Y" then I can eliminate the Formulas and
Hopefully significantly increase my speed of the workbook.

So what I am looking for is a Macro that will Scan the workseet and
whereever it finds a "Y" in Column P...it will COPY and PASTE SPECIAL VALUES
(for that row, columns A-U, I would like to keep whatever formulas that are
after Column U active).

My worksheet name is "ACTIVE ECO's" if that helps.

  #3   Report Post  
Posted to microsoft.public.excel.misc
TR TR is offline
external usenet poster
 
Posts: 11
Default Macro to Cut and paste Values

Thanks worked Great

"Gary''s Student" wrote:

Try this small macro:

Sub noformulas()
Dim i As Long, n As Long
n = Cells(Rows.Count, "P").End(xlUp).Row
For i = 1 To n
If Cells(i, "P").Value = "Y" Then
Set r = Range("A" & i & ":U" & i)
r.Copy
r.PasteSpecial Paste:=xlPasteValues
End If
Next
End Sub

--
Gary''s Student - gsnu201003


"tr" wrote:

I have a workbook with many lookups to external workbooks via function.
INDIERCT.EXT This works fine.....but is very slow; as it cycles every
associated file everytime I open my workbook (there could be 1000's).

In Column P (titled) Complete? A "Y" or "N" indicates status of any given
ROW of data. If the status is "Y" then I can eliminate the Formulas and
Hopefully significantly increase my speed of the workbook.

So what I am looking for is a Macro that will Scan the workseet and
whereever it finds a "Y" in Column P...it will COPY and PASTE SPECIAL VALUES
(for that row, columns A-U, I would like to keep whatever formulas that are
after Column U active).

My worksheet name is "ACTIVE ECO's" if that helps.

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
Paste values - macro yshridhar Excel Discussion (Misc queries) 4 March 25th 08 06:36 AM
A macro to paste values Matthew Excel Discussion (Misc queries) 2 September 17th 07 10:25 AM
Paste Values Macro John Calder New Users to Excel 4 May 28th 07 10:19 PM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 1 June 11th 05 12:44 AM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 0 June 10th 05 03:38 PM


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