S
Suzanne
I'm pulling data from one worksheet to another with:
Sub IMPORT()
Dim myrange, copyrange As Range
Sheets("IMPORT FROM").Select
Set myrange = Range("C2:C200")
For Each c In myrange
If c.Value <> "" Then
If copyrange Is Nothing Then
Set copyrange = c.EntireRow
Else
Set copyrange = Union(copyrange, c.EntireRow)
End If
End If
Next
copyrange.Copy
Sheets("IMPORT TO").Select
Range("A4").Select
Selection.PasteSpecial Paste:=xlPasteValues
End Sub
1. Columns C & D in 'IMPORT FROM' contain first name and last name.
Q: Can I combine this data when pasting names (which range anywhere from
1-200 names), i.e., combine first and last name in 'IMPORT TO'!A4:A200.
2. Columns E through AD in 'IMPORT FROM' contain three variables:
0-9%
10-50%
51-100%
Note: These variables will not necessarily appear in every row/column;
however, they will always be associated with a name.
Q: How can I convert the variable to a letter when pasting to 'IMPORT TO';
specifically:
0-9% = R (Rarely)
10-50% = S (Sometimes)
51-100% = F (Frequently)
BTW... reducing the size of the variable to a single digit is needed to fit
all the data onto a hardcopy report that is already tight on legal size paper.
Thank you
Sub IMPORT()
Dim myrange, copyrange As Range
Sheets("IMPORT FROM").Select
Set myrange = Range("C2:C200")
For Each c In myrange
If c.Value <> "" Then
If copyrange Is Nothing Then
Set copyrange = c.EntireRow
Else
Set copyrange = Union(copyrange, c.EntireRow)
End If
End If
Next
copyrange.Copy
Sheets("IMPORT TO").Select
Range("A4").Select
Selection.PasteSpecial Paste:=xlPasteValues
End Sub
1. Columns C & D in 'IMPORT FROM' contain first name and last name.
Q: Can I combine this data when pasting names (which range anywhere from
1-200 names), i.e., combine first and last name in 'IMPORT TO'!A4:A200.
2. Columns E through AD in 'IMPORT FROM' contain three variables:
0-9%
10-50%
51-100%
Note: These variables will not necessarily appear in every row/column;
however, they will always be associated with a name.
Q: How can I convert the variable to a letter when pasting to 'IMPORT TO';
specifically:
0-9% = R (Rarely)
10-50% = S (Sometimes)
51-100% = F (Frequently)
BTW... reducing the size of the variable to a single digit is needed to fit
all the data onto a hardcopy report that is already tight on legal size paper.
Thank you