![]() |
Sheet name=Cell value
Hey Everyone,
Here's what I'm trying to do: If a cell value from one sheet equals another sheet name, I want to enter a value from a cell adjacent to the first cell into the worksheet with the same name. I don't really know where to start. Any help would be greatly appreciated! M |
Sheet name=Cell value
On Thursday, March 28, 2013 1:09:53 PM UTC+11, Mahal wrote:
Hey Everyone, Here's what I'm trying to do: If a cell value from one sheet equals another sheet name, I want to enter a value from a cell adjacent to the first cell into the worksheet with the same name. I don't really know where to start. The following code will active a subroutine on workbook_open event. I hope this helps. Private Sub Workbook_Open() If ThisWorkbook.Worksheets("Sheet1").Range("A1").Valu e = ThisWorkbook.Worksheets("Sheet2").Name Then ThisWorkbook.Worksheets("Sheet1").Range("A1") = ThisWorkbook.Worksheets("Sheet2").Range("A1") End If End Sub Any help would be greatly appreciated! M |
Sheet name=Cell value
On Thursday, April 11, 2013 6:14:48 PM UTC+10, Subodh wrote:
On Thursday, March 28, 2013 1:09:53 PM UTC+11, Mahal wrote: Hey Everyone, Here's what I'm trying to do: If a cell value from one sheet equals another sheet name, I want to enter a value from a cell adjacent to the first cell into the worksheet with the same name. I don't really know where to start. The following code will active a subroutine on workbook_open event. I hope this helps. Private Sub Workbook_Open() If ThisWorkbook.Worksheets("Sheet1").Range("A1").Valu e = ThisWorkbook.Worksheets("Sheet2").Name Then ThisWorkbook.Worksheets("Sheet1").Range("A1") = ThisWorkbook.Worksheets("Sheet2").Range("A1") End If End Sub Any help would be greatly appreciated! M Find the following amended code................... Private Sub Workbook_Open() If ThisWorkbook.Worksheets("Sheet1").Range("A1").Valu e = ThisWorkbook.Worksheets("Sheet2").Name Then ThisWorkbook.Worksheets("Sheet2").Range("A1").Valu e = ThisWorkbook.Worksheets("Sheet1").Range("A1").Valu e End If End Sub |
All times are GMT +1. The time now is 11:10 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com