U
ufo_pilot
I have had some great help from Bernie Deitrick on starting out with a code
that should let me do the below mentioned activity.
I am trying to learn more about macro and codes and have started a project
given to me by my manager ( I will try to get this done for 2006 ).
I have altered the code somewhat, since I decided to change some of the
sheet a little.
But this is what I need the macro to do once it is assigned to a click -
button "send"
Copy row 488 from column D through column AT
Check the value in A1 (has a number ranging from 1 to 365)
Then Find the value from A1
In rows C493 through C857 ( each row in column C contains a number between
1 and 365)
and PasteSpecial ValuesOnly
in the row matching A1 from column D through column AT
this needs to copy blanks as blanks too.
Then clear contets of A151 through A300
The original gave me a run error 91 and highlighted this part of the code:
Worksheets("INPUT").Range("D488:AT488").Find(myFind, _
LookIn:=xlValues, LookAt:=xlWhole).Offset(1, 0). _
Resize(41, 1).PasteSpecial xlPasteValues
I am running '97
This is the (altered) code
Sub send2()
Dim myFind As Integer
myFind = Worksheets("INPUT").Range("$A$1").Value
Worksheets("INPUT").Range("$C$493:$C$857").Find(myFind, _
LookIn:=xlValues, LookAt:=xlWhole).Offset(1, 0). _
Resize(41, 1).Copy
Worksheets("INPUT").Range("D488:AT488").Find(myFind, _
LookIn:=xlValues, LookAt:=xlWhole).Offset(1, 0). _
Resize(41, 1).PasteSpecial xlPasteValues
Worksheets("INPUT").Range("$A$151:$A$300").ClearContents
End Sub
btw... what does the "Resize(41,1)" mean in this code?
and why does the number -4163 show up when I place my cursor over xlValues
where is xlValues getting this number from?
I appreciate any help and/or explainations.
Thank You all.
that should let me do the below mentioned activity.
I am trying to learn more about macro and codes and have started a project
given to me by my manager ( I will try to get this done for 2006 ).
I have altered the code somewhat, since I decided to change some of the
sheet a little.
But this is what I need the macro to do once it is assigned to a click -
button "send"
Copy row 488 from column D through column AT
Check the value in A1 (has a number ranging from 1 to 365)
Then Find the value from A1
In rows C493 through C857 ( each row in column C contains a number between
1 and 365)
and PasteSpecial ValuesOnly
in the row matching A1 from column D through column AT
this needs to copy blanks as blanks too.
Then clear contets of A151 through A300
The original gave me a run error 91 and highlighted this part of the code:
Worksheets("INPUT").Range("D488:AT488").Find(myFind, _
LookIn:=xlValues, LookAt:=xlWhole).Offset(1, 0). _
Resize(41, 1).PasteSpecial xlPasteValues
I am running '97
This is the (altered) code
Sub send2()
Dim myFind As Integer
myFind = Worksheets("INPUT").Range("$A$1").Value
Worksheets("INPUT").Range("$C$493:$C$857").Find(myFind, _
LookIn:=xlValues, LookAt:=xlWhole).Offset(1, 0). _
Resize(41, 1).Copy
Worksheets("INPUT").Range("D488:AT488").Find(myFind, _
LookIn:=xlValues, LookAt:=xlWhole).Offset(1, 0). _
Resize(41, 1).PasteSpecial xlPasteValues
Worksheets("INPUT").Range("$A$151:$A$300").ClearContents
End Sub
btw... what does the "Resize(41,1)" mean in this code?
and why does the number -4163 show up when I place my cursor over xlValues
where is xlValues getting this number from?
I appreciate any help and/or explainations.
Thank You all.