repost: explained better (I hope)

  • Thread starter Thread starter Logan
  • Start date Start date
L

Logan

What I would like to do is expand on:

Sub AddNewData()
Dim lRows As Long

With Range("Database")
lRows = .Rows.Count + 1
Range("Input").Copy Destination:=.Cells(lRows, 1)
.Resize(lRows).Name = "Database"
End With
End Sub

I would like to lookup E5 If = "MIDGET" then paste info
From "Input" into sheet "MIDGET" range "midget"
If E5 = "SQUIRT" then paste info into sheet "SQUIRT" range
"midget" etc.
I would still like every entry to go into "Database" as well.

I hope this explains it a little better.
 
Logan
Sub AddNewData()
Dim lRows As Long

With Range("Database")
lRows = .Rows.Count + 1
Range("Input").Copy Destination:=.Cells(lRows, 1)
.Resize(lRows).Name = "Database"

Range("Input").Copy _
Destination:=Sheets(Range("E5").Value). _
Range("A65536").End(xlUp).Offset(1,0)
End With
End Sub

This makes the destination equal to the next blank cell in column A on the
sheet with the same name as the what's in E5.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top