Having Excel Move Data that has a certain value

  • Thread starter Thread starter EGerety
  • Start date Start date
E

EGerety

I have a workbook that has several worksheets in it. I wanted to know
if anyone knows if it is possible for Excel to be able to recognize a
value point and when it does move an entire line of data (several
cells) to anothre worksheet within the workbook automatically.

Worksheet One

CELL A1 = Name
CELL B1 = County
CELL C1 = Date
CELL D1 = Value point 1 for yes 2 for now

What I would like to try to do is if CELL D1 equals 1 then have Excel
move cells A1, B1 and C1 to another worksheet. Is this possible and I
am not allowed to use ACCESS. My group's director doesn't understand
how to use it so we are not allowed to.
 
And of course your group director stops you using Access because he can!!

Try this which may because of a lack of detail on where to put the data may
need some refinement. Basically it looks down Col D of sheet 3 and if it fins
a 1(Yes) moves the row to the top row of sheet 2.

Sub versive()
Dim myRange As Range
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
End Sub

Mike
 
And of course your group director stops you using Access because he can!!

Try this which may because of a lack of detail on where to put the data may
need some refinement. Basically it looks down Col D of sheet 3 and if it fins
a 1(Yes) moves the row to the top row of sheet 2.

Sub versive()
Dim myRange As Range
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
End Sub

Mike








- Show quoted text -

Thanks -- I am going to give this a shot and see what happen and you
are correct my Director is doing this because he can. His words
exactly!
 
And of course your group director stops you using Access because he can!!

Try this which may because of a lack of detail on where to put the data may
need some refinement. Basically it looks down Col D of sheet 3 and if it fins
a 1(Yes) moves the row to the top row of sheet 2.

Sub versive()
Dim myRange As Range
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
End Sub

Mike








- Show quoted text -

Mike - How do you install this into EXCEL?
 
Back
Top