Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy cells from two worksheets into one
What I have is workbook that has two worksheets with one cell that could be
the same in both worksheets. If that cell has the same information in both worksheets I would like to create a third worksheet and copy the information from both of the other two worksheets into the new one. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy cells from two worksheets into one
Sub FindTwoThenAddOne()
Dim Rng As Range Dim Rng2 As Range Dim Ws3 As Worksheet Set Rng = ActiveWorkbook.Worksheets(1).Range("A1") Set Rng2 = ActiveWorkbook.Worksheets(2).Range("A1") If Rng = Rng2 Then Set Ws3 = Worksheets.Add(after:=Worksheets(Worksheets.Count) ) Ws3.Range("A1") = Rng End If End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy cells from two worksheets into one
Thanks I will give it a try.
"David Sisson" wrote: Sub FindTwoThenAddOne() Dim Rng As Range Dim Rng2 As Range Dim Ws3 As Worksheet Set Rng = ActiveWorkbook.Worksheets(1).Range("A1") Set Rng2 = ActiveWorkbook.Worksheets(2).Range("A1") If Rng = Rng2 Then Set Ws3 = Worksheets.Add(after:=Worksheets(Worksheets.Count) ) Ws3.Range("A1") = Rng End If End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy Cells from multiple Worksheets in same workbook. | Excel Discussion (Misc queries) | |||
Copy cells into worksheets via pull-down | Excel Discussion (Misc queries) | |||
enter data once... copy to multiple cells on other worksheets | Excel Discussion (Misc queries) | |||
copy specified cells from different worksheets to one worksheet | Excel Discussion (Misc queries) | |||
How to copy multiple cells between worksheets | Excel Discussion (Misc queries) |