Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
NewExcelGuy
 
Posts: n/a
Default Referencing worksheets


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   Report Post  
Don
 
Posts: n/a
Default

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   Report Post  
Don
 
Posts: n/a
Default

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
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
Changing a Link Mid-way Across Worksheets Frosty Excel Worksheet Functions 0 August 25th 05 12:03 AM
Shortcut for copying formulas referencing different worksheets bhigdon Excel Discussion (Misc queries) 1 July 1st 05 11:09 PM
Referencing Variable Name Worksheets camerons New Users to Excel 8 May 9th 05 09:57 PM
Summary worksheet referencing multiple worksheets Jon Excel Worksheet Functions 1 January 27th 05 01:12 AM
HELP! How do you--> Lock a set of rows but also link worksheets to FRUSTRATED Excel Discussion (Misc queries) 6 December 29th 04 10:05 PM


All times are GMT +1. The time now is 10:17 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"