Write in one cell & copies to another

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to know how I can type text in one cell and it copies the same
text in another cell but on a different row and sheet. A quick cut and paste
is not the answer as I have numerous inserts.
 
Sometimes you can use a worksheet_change VBA macro. Your request is too
general to see if it is applicable.
 
Thanks for the reply. I'm new to the world of excel and unsure if this would
help. The spreadsheet I have lists details down 50-60 rows and has 12 colums
and then the details are in a differnt order on another. Does that explain
enough?
 
You ared not giving me a clue at the destination location. How do yo know
where the data needs to be writen.
 
try this

Sub populatesheet2()

Const AlphabetizedSheet = "Sheet1"
Const PopulateSheet = "Sheet2"

With Sheets(AlphabetizedSheet)
.Activate
LastRow = .Cells(Rows.Count, "A").End(xlUp).Row
Set ShAlphaRange = Range(.Cells(2, "A"), _
.Cells(LastRow, "A"))
End With

With Sheets(PopulateSheet)
.Activate
LastRow = .Cells(Rows.Count, "A").End(xlUp).Row
Set ShPopulateRange = Range(.Cells(2, "A"), _
.Cells(LastRow, "A"))
End With

Sheets(AlphabetizedSheet).Activate

For Each cell In ShAlphaRange

Set c = ShPopulateRange. _
Find(what:=cell.Value, LookIn:=xlValues)
If Not c Is Nothing Then
Set CopyRange = Range(Cells(cell.Row, "B"), _
Cells(cell.Row, "K"))
CopyRange.Copy _
Destination:=Sheets(PopulateSheet). _
Range("B" & c.Row)
End If

Next cell
End Sub
 
The spreadsheet two worksheets, the first worksheet has a list of 50-60
schools downwards alphabetically in column A. Columns B - K have different
headings ie how many classrooms etc. In the second worksheet the same
headings are there but the list of schools in column A are not in
alphabetical order. I would like to enter the information beside one school
under a specific column and have it populates the same school and heading in
the other worksheet. Have I explained enough, can you help? Thanks.
 
Back
Top