- Jul 26, 2013
- 1
- 0
- 0
Hallo,
I'm trying to make a macro that seeks the sheet that is filled in a cell ( activecell)
and get in the sheet ,that i was seeking for, all the information that i need
( i need the information of D1-D2-D3, i need those cells filled in a general sheet in B1-B2-B3 ).
it's the intention to just use one macro like this for different names.
I mean with that, that with the next sheet name (not d1-d2-d3 but e1-e2-e3) it places the information in de cell range under the previous. ( In the same ' General' ofcours; So this is incorrrect )
Maybe this is possible with a 'loop' because all the names that are equal to a sheet are in cel A (A1-A2-A3-A4-A5-A6).
Thank you for your time
I'm trying to make a macro that seeks the sheet that is filled in a cell ( activecell)
and get in the sheet ,that i was seeking for, all the information that i need
( i need the information of D1-D2-D3, i need those cells filled in a general sheet in B1-B2-B3 ).
Sub Test()
Dim ws As Worksheet
Set ws = Sheets(ActiveCell.Value)
With Sheets("General") 'assuming you have a sheet named General
.Range("B1").Value = ws.Range("D1").Value
.Range("B2").Value = ws.Range("D2").Value
.Range("B3").Value = ws.Range("D3").Value
End With
End Sub
it's the intention to just use one macro like this for different names.
I mean with that, that with the next sheet name (not d1-d2-d3 but e1-e2-e3) it places the information in de cell range under the previous. ( In the same ' General' ofcours; So this is incorrrect )
Maybe this is possible with a 'loop' because all the names that are equal to a sheet are in cel A (A1-A2-A3-A4-A5-A6).
Thank you for your time
