How to copy text between sheet?

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

Hello,

I have two sheets: sheet1 and sheet 2 in one workbook. In
the sheet 1: there are

Company Employee
A 10
B 9
C 7
D 5

so I write a macro,
If ActiveSheet.Cells(3, "B").Value = 9 Then
Sheet2.Cells(1, "A").value = sheet1.cells(2, "A")
end if

So the second workbook will look like
Company
B

THere is no error in my sytnax, but when I checked the
sheet2, the sheet is empty. What I have been doing wrong?

THanks
 
Hello,

It doesn't work for me. I have some radio buttons in
sheet2, will that be a reason? Is any alternative way to
do the same task?

Thanks
 
Instead of this
If ActiveSheet.Cells(3, "B").Value = 9 Then
Sheet2.Cells(1, "A").value = sheet1.cells(2, "A")
end if

try it like this and see what happens
If ActiveSheet.Cells(3, "B")= 9 Then
Sheets("yourSheetNAME").Cells(1, "A").value _
= sheets("yourSheetNAME").cells(2, "A")
end if
 
Back
Top