Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Movng Data Automatically the Fits a provision

Sub versive()
Dim myRange As Range
Set myRange = Range("D2:D25")
For Each "c" c.Select
If c.Value = 1 Then
Selection.EntireRow.Copy
Worksheets("Sheet2").Rows("1:1").Insert Shift:=xlDown
End If
Next
End Sub


The above formula was given to me by a "Mike" but I am uncertain how
to use it.

what I am trying to do is make excel pickout data that equals a
certain text value and move it automatically to another worksheet in a
workbook.

If anyone can help me out here I would appreicate it. I am NOT
allowed to use ACCESS I must use Excel.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 527
Default Movng Data Automatically the Fits a provision

Hi I've modified it slightly. It now deletes the cells in sheet2 so that data
will not be duplicated if the macro has been run before. Once you have copied
it into a VBModule ALT + F!!, Insert Module (paste) you can run it from sheet
1.

If you intend to run it continually Place a Command button on your sheet1
(View, Forms) and select command button and draw it on sheet1. You will be
prompted to assign a macro so select CopyDAta

Sub CopyData()
Dim myRange As Range
Application.ScreenUpdating = False
Sheets("Sheet2").Activate
Cells.ClearContents
Sheets("sheet1").Select
Set myRange = Range("D2:D25")
For Each c In myRange
c.Select
If c.Value = 1 Then
Selection.EntireRow.Copy
Worksheets("Sheet2").Rows("1:1").Insert Shift:=xlDown
End If
Next
Application.CutCopyMode = False
Range("a1").Select
Application.ScreenUpdating = True
End Sub

Click the button and away you go.

Regards
Peter

" wrote:

Sub versive()
Dim myRange As Range
Set myRange = Range("D2:D25")
For Each "c" c.Select
If c.Value = 1 Then
Selection.EntireRow.Copy
Worksheets("Sheet2").Rows("1:1").Insert Shift:=xlDown
End If
Next
End Sub


The above formula was given to me by a "Mike" but I am uncertain how
to use it.

what I am trying to do is make excel pickout data that equals a
certain text value and move it automatically to another worksheet in a
workbook.

If anyone can help me out here I would appreicate it. I am NOT
allowed to use ACCESS I must use Excel.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Movng Data Automatically the Fits a provision

Peter -

Thank you so much but what would work best is if the data would remain
on sheet two but removed from sheet one once it has been run.

any suggestions?





On Jun 20, 10:21 am, Billy Liddel
wrote:
Hi I've modified it slightly. It now deletes the cells in sheet2 so that data
will not be duplicated if the macro has been run before. Once you have copied
it into a VBModule ALT + F!!, Insert Module (paste) you can run it from sheet
1.

If you intend to run it continually Place a Command button on your sheet1
(View, Forms) and select command button and draw it on sheet1. You will be
prompted to assign a macro so select CopyDAta

Sub CopyData()
Dim myRange As Range
Application.ScreenUpdating = False
Sheets("Sheet2").Activate
Cells.ClearContents
Sheets("sheet1").Select
Set myRange = Range("D2:D25")
For Each c In myRange
c.Select
If c.Value = 1 Then
Selection.EntireRow.Copy
Worksheets("Sheet2").Rows("1:1").Insert Shift:=xlDown
End If
Next
Application.CutCopyMode = False
Range("a1").Select
Application.ScreenUpdating = True
End Sub

Click the button and away you go.

Regards
Peter



" wrote:
Sub versive()
Dim myRange As Range
Set myRange = Range("D2:D25")
For Each "c" c.Select
If c.Value = 1 Then
Selection.EntireRow.Copy
Worksheets("Sheet2").Rows("1:1").Insert Shift:=xlDown
End If
Next
End Sub


The above formula was given to me by a "Mike" but I am uncertain how
to use it.


what I am trying to do is make excel pickout data that equals a
certain text value and move it automatically to another worksheet in a
workbook.


If anyone can help me out here I would appreicate it. I am NOT
allowed to use ACCESS I must use Excel.- Hide quoted text -


- Show quoted text -





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 527
Default Movng Data Automatically the Fits a provision

OK Tigger

I've modified the macro using the great Bob Phillip's method of deleting
rows. Hope that this is what you want.

Sub CopyData()
Dim myRange As Range, MatchRange As Range
Application.ScreenUpdating = False
'Sheets("Sheet2").Activate
'Cells.ClearContents
Sheets("sheet1").Select
Set myRange = Range("D2:D25")
For Each c In myRange
c.Select
If c.Value = 1 Then
Selection.EntireRow.Copy
Worksheets("Sheet2").Rows("1:1").Insert Shift:=xlDown
If MatchRange Is Nothing Then
Set MatchRange = Cells(c.Row, 4)
Else
Set MatchRange = Union(MatchRange, Cells(c.Row, 4))
End If
End If
Next c
Application.CutCopyMode = False
If Not MatchRange Is Nothing Then
MatchRange.EntireRow.Delete
End If
Range("a1").Select
Application.ScreenUpdating = True
End Sub


Regards
Peter

By the way, Bill Liddel was a great Liverpool Football (socer) player.

"TheTigger" wrote:

Peter -

Thank you so much but what would work best is if the data would remain
on sheet two but removed from sheet one once it has been run.

any suggestions?





On Jun 20, 10:21 am, Billy Liddel
wrote:
Hi I've modified it slightly. It now deletes the cells in sheet2 so that data
will not be duplicated if the macro has been run before. Once you have copied
it into a VBModule ALT + F!!, Insert Module (paste) you can run it from sheet
1.

If you intend to run it continually Place a Command button on your sheet1
(View, Forms) and select command button and draw it on sheet1. You will be
prompted to assign a macro so select CopyDAta

Sub CopyData()
Dim myRange As Range
Application.ScreenUpdating = False
Sheets("Sheet2").Activate
Cells.ClearContents
Sheets("sheet1").Select
Set myRange = Range("D2:D25")
For Each c In myRange
c.Select
If c.Value = 1 Then
Selection.EntireRow.Copy
Worksheets("Sheet2").Rows("1:1").Insert Shift:=xlDown
End If
Next
Application.CutCopyMode = False
Range("a1").Select
Application.ScreenUpdating = True
End Sub

Click the button and away you go.

Regards
Peter



" wrote:
Sub versive()
Dim myRange As Range
Set myRange = Range("D2:D25")
For Each "c" c.Select
If c.Value = 1 Then
Selection.EntireRow.Copy
Worksheets("Sheet2").Rows("1:1").Insert Shift:=xlDown
End If
Next
End Sub


The above formula was given to me by a "Mike" but I am uncertain how
to use it.


what I am trying to do is make excel pickout data that equals a
certain text value and move it automatically to another worksheet in a
workbook.


If anyone can help me out here I would appreicate it. I am NOT
allowed to use ACCESS I must use Excel.- Hide quoted text -


- Show quoted text -






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
How do I list all Data in a column that fits between two points? Jason Excel Discussion (Misc queries) 2 February 22nd 07 04:51 PM
I would like a function to return a value that fits its range rpbsr Excel Worksheet Functions 4 September 7th 06 06:49 PM
automatically expand chart data series as data is added jlarson Charts and Charting in Excel 1 March 9th 06 10:31 AM
nonlinear regression/ curve fits geocalc Excel Discussion (Misc queries) 4 December 30th 05 08:18 PM
Making an alphabetical list that fits on one page. David New Users to Excel 3 October 9th 05 12:03 AM


All times are GMT +1. The time now is 08:31 AM.

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"