Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 99
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 99
Default 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I copying data from a cell on sheet to a diff cell/sheet Bowldiva120 Excel Worksheet Functions 1 March 21st 10 11:25 PM
copy a sum in cell on sheet 1 (not formula) to cell on sheet 2 John Excel Worksheet Functions 1 March 2nd 09 12:01 AM
copy a sum in cell on sheet 1 (not formula) to cell on sheet 2 Eduardo Excel Worksheet Functions 0 February 27th 09 05:19 PM
Help: auto-copy entire rows from 1 sheet (based on cell criteria) to another sheet. bertbarndoor Excel Programming 4 October 5th 07 04:00 PM
Excell:Move from any Cell Sheet 1 to any cell Sheet 2 etc. eldo Excel Worksheet Functions 1 August 16th 05 09:17 AM


All times are GMT +1. The time now is 05:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"