My workbook has 2 worksheets. Worksheet 1 cell A1 contain ABC, cell A2 contain DEF. Now, how can I automatically extract these data to worksheet 2 cell A1 as ABC, cell A2 also ABC, and Cell A3 is DEF, A4 also same DEF
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1:A2")) Is Nothing Then
Sheets("Sheet2").Range("A1:A2").Value = Sheets("Sheet1").Range("A1").Value
Sheets("Sheet2").Range("A3:A4").Value = Sheets("Sheet1").Range("A2").Value
End If
End Sub
Sub With_Macro_Button()
Sheets("Sheet2").Range("A1:A2").Value = Sheets("Sheet1").Range("A1").Value
Sheets("Sheet2").Range("A3:A4").Value = Sheets("Sheet1").Range("A2").Value
End Sub
If you just want a formula, you will just enter a formula like this in the cell you want in sheet2.Sorry, I didn't notice I bold it.
I didn't really mean automatically, I just want an Excel formula to do it.
BTW, beside the Macro you suggest, is there a formula to do it.
Thank you very much
This is not what I want. What I want is sheet2 A1 and A2 has the same value of sheet1 A1, and sheet2 A3 and A4 has same value as sheet1A2 and so on.If you just want a formula, you will just enter a formula like this in the cell you want in sheet2.
=Sheet1!A1
or:
=Sheet1!A2
And so, on
Yes. I just gave you an example.This is not what I want. What I want is sheet2 A1 and A2 has the same value of sheet1 A1, and sheet2 A3 and A4 has same value as sheet1A2 and so on.
If I use your method, I have to enter every cells and it'll be very tedious and a lot of works. What I want is just a formula to insert in the cell and drag it downYes. I just gave you an example.
Just modify to your needs.
This is beyond my knowledgebase.If I use your method, I have to enter every cells and it'll be very tedious and a lot of works. What I want is just a formula to insert in the cell and drag it down