Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]() I am trying to figure out a way to reference a value from one sheet to another. I know how to go to sheet 2 and "receive" a value from sheet 1 (=sheet1!a1), but I don't know how to take a value from sheet1 and "send" it to sheet 2 (??). Also, say I have a workbook with one worksheet in it titled "RED". Is there a way for me to say if there is a value in cell b2 on worksheet "RED" for Excel to automatically create a new workskeet and title it "BLUE"? One more thing. Regardless of whether both of these can be done separately, is there a way to do them simultaneously? -- NewExcelGuy ------------------------------------------------------------------------ NewExcelGuy's Profile: http://www.excelforum.com/member.php...o&userid=27141 View this thread: http://www.excelforum.com/showthread...hreadid=466567 |
#2
![]() |
|||
|
|||
![]()
Copy code below
Alt-F11 to open the VBA editor Insert module from the menubar Paste the sub Alt-Q to go back to excel Alt-F8 Select test Run ' Sub starts here Sub test() Sheets("red").Select If Range("b2") = "something" Then Worksheets.Add.Name = "Blue" ActiveSheet.Range("a1") = Sheets("red").Range("b2") Sheets("red").Select End Sub I hope this helps "NewExcelGuy" wrote in message ... I am trying to figure out a way to reference a value from one sheet to another. I know how to go to sheet 2 and "receive" a value from sheet 1 (=sheet1!a1), but I don't know how to take a value from sheet1 and "send" it to sheet 2 (??). Also, say I have a workbook with one worksheet in it titled "RED". Is there a way for me to say if there is a value in cell b2 on worksheet "RED" for Excel to automatically create a new workskeet and title it "BLUE"? One more thing. Regardless of whether both of these can be done separately, is there a way to do them simultaneously? -- NewExcelGuy ------------------------------------------------------------------------ NewExcelGuy's Profile: http://www.excelforum.com/member.php...o&userid=27141 View this thread: http://www.excelforum.com/showthread...hreadid=466567 |
#3
![]() |
|||
|
|||
![]()
Actually, this would be better:
Sub test() Sheets("red").Select If Range("b2") = "something" Then Worksheets.Add.Name = "Blue" ActiveSheet.Range("a1") = Sheets("red").Range("b2") Else End If Sheets("red").Select End Sub "Don" wrote in message ... Copy code below Alt-F11 to open the VBA editor Insert module from the menubar Paste the sub Alt-Q to go back to excel Alt-F8 Select test Run ' Sub starts here Sub test() Sheets("red").Select If Range("b2") = "something" Then Worksheets.Add.Name = "Blue" ActiveSheet.Range("a1") = Sheets("red").Range("b2") Sheets("red").Select End Sub I hope this helps "NewExcelGuy" wrote in message ... I am trying to figure out a way to reference a value from one sheet to another. I know how to go to sheet 2 and "receive" a value from sheet 1 (=sheet1!a1), but I don't know how to take a value from sheet1 and "send" it to sheet 2 (??). Also, say I have a workbook with one worksheet in it titled "RED". Is there a way for me to say if there is a value in cell b2 on worksheet "RED" for Excel to automatically create a new workskeet and title it "BLUE"? One more thing. Regardless of whether both of these can be done separately, is there a way to do them simultaneously? -- NewExcelGuy ------------------------------------------------------------------------ NewExcelGuy's Profile: http://www.excelforum.com/member.php...o&userid=27141 View this thread: http://www.excelforum.com/showthread...hreadid=466567 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Changing a Link Mid-way Across Worksheets | Excel Worksheet Functions | |||
Shortcut for copying formulas referencing different worksheets | Excel Discussion (Misc queries) | |||
Referencing Variable Name Worksheets | New Users to Excel | |||
Summary worksheet referencing multiple worksheets | Excel Worksheet Functions | |||
HELP! How do you--> Lock a set of rows but also link worksheets to | Excel Discussion (Misc queries) |