Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 20th, 2004, 04:16 AM
Registered User
 
Join Date: Aug 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Excel Chained cell references

Gurus,

  I am pretty much a novice to Excel / VBA Programmming, so please pardon my ignorance. I' trying to figure out what formula to use in the following scenario:

Cell - Sheet1!B1
the formula should chain through the references Sheet1!A1 -> Sheet2!A1 -> Sheet3!B1 -> extract the column (B in this case) -> lookup the corresponding cell in row 2 (Sheet3!B2) and display its value in Sheet1!B1.

Sheet1 >

Sheet1!A1 =Sheet2!A1
Sheet1!B1 ????

Sheet2 >

Sheet2!A1
=Sheet3!B1

Sheet 3>

Sheet3!A1 = 'Employee Name'
Sheet3!A2 = 'Tom Burke'
Sheet3!B1 = 'Employee ID'
Sheet3!B2 = 103416

Any suggestion would be very helpful.

TIA,
Shantanu
 
Old August 23rd, 2004, 04:49 AM
Authorized User
 
Join Date: Aug 2004
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Don't see what your problem is :-

Sheet1!B1 =Sheet2!B1
or
Sheet1!B1 =Sheet3!B1

-----------------------
Regards BrianB
Most problems occur from starting at the wrong place.
Use a cup of coffee to make Windows run faster.
It is easy until you know how.
 
Old August 23rd, 2004, 10:53 AM
Registered User
 
Join Date: Aug 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by BrianB
 Don't see what your problem is :-

Sheet1!B1 =Sheet2!B1
or
Sheet1!B1 =Sheet3!B1
Hello Brian,

  Thanks for your response. My apologies. I think I made an error that led to the confusion.

  let me correct & rephrase my query.

Corrected >

Sheet1 refers to data in Sheet3 through references in Sheet2. The formula that I am looking for Sheet1!B1 does the following: It'll chain through the references in Sheet2!A1 till it reaches an absolute value 'Employee Name' (in Sheet3!A1), pick the corresponding value in Sheet3!B1 and display in Sheet1!B1.

  Why I need this? Say, now I change the reference in Sheet2!A1 to =Sheet3!A2 (from =Sheet3!A1). Sheet1!A1 automatically changes from 'Employee Name' to 'Tom Burke'. The formula in Sheet1!B1 will automatically cause the corresponding employee # to be displayed 103416



Sheet1 >

Sheet1!A1 =Sheet2!A1
Sheet1!B1 ????

Sheet2 >

Sheet2!A1 =Sheet3!A1

Sheet 3>

Sheet3!A1 = 'Employee Name'
Sheet3!A2 = 'Tom Burke'
Sheet3!B1 = 'Employee ID'
Sheet3!B2 = 103416

Thanks,
Shantanu.





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get Excel Cell color populate .NET Framework 2.0 2 March 3rd, 2014 04:25 AM
Excel cell Formating Using C# veeruu C# 5 September 21st, 2011 01:56 PM
c# and Excel cell values hardboiled C# 0 November 16th, 2007 11:12 AM
cell references excel weazy Excel VBA 0 June 21st, 2006 09:28 AM
Unprotect a cell on Excel camf650 VBScript 2 April 14th, 2004 11:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.