+ Reply to Thread
Results 1 to 8 of 8

syntax to select cell in another sheet based on offset of active cell in current sheet

  1. #1
    Registered User
    Join Date
    04-19-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    49

    syntax to select cell in another sheet based on offset of active cell in current sheet

    I have been trying to develop a client data input form that is referenced by a printable output form in another sheet. What I am struggling with is how to have my code make changes in the output form based on the cell input in the data entry form. For example, if I want to add a row in the data input form (Cell A17) and that corresponds to adding a row in the output form (Cell A7).

    So my question is how can I write a code to create an offset based on active cell (active sheet) to another sheet?

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: syntax to select cell in another sheet based on offset of active cell in current sheet

    Submit a workbook example

  3. #3
    Registered User
    Join Date
    04-19-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: syntax to select cell in another sheet based on offset of active cell in current sheet

    I would preferably like avoid using the message box, but that is the work around at the moment. Ideally, the corresponding addition in Networth just happens....

    1. Go to Client Data. Click in Cell A24
    2. Go to Networth. Click in A9.
    3. Go back to Client Data. Click Add Row.
    4. Now when you enter in new data in Row 24 it automatically gets added to Networth under the relevant section.

    Trying to avoid step 2...
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: syntax to select cell in another sheet based on offset of active cell in current sheet

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-19-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: syntax to select cell in another sheet based on offset of active cell in current sheet

    Okay. First off this is great! It is getting closer. However, there seems to be an issue if you add a row and the new row has the same type of account selected. For example, if you add a row under Cash Accounts and choose checking, when you add another row it finds the first "Checking" in Networth and fills down.

    Can we set rFind = ActiveCell.Offset(-1,0).End(xlToRight) ??? That didn't quite work for me but I am trying to have it set all columns with values above lRow to be the range we will then search for in ws2.
    Last edited by duvius; 10-03-2014 at 02:17 PM.

  6. #6
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: syntax to select cell in another sheet based on offset of active cell in current sheet

    I have no idea what you mean.

  7. #7
    Registered User
    Join Date
    04-19-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: syntax to select cell in another sheet based on offset of active cell in current sheet

    Ummm I am not sure what part of my reply you don't understand. First, when I actually put the code you wrote in action it does not work as desired.

    For example, do the following:
    1. Select Row 24. Hit Add Row
    2. Choose "Checking", Steve and put in balance of 25,000
    3. Now Select Row 25. Hit Add Row.
    4. Choose "Savings", Samantha and balance of 50,000
    5. Now go to Networth and look under "Cash Accounts"

    Do you see what I mean? If a person has more than one Checking account it will find the first one it sees and fill that one down which creates a duplicate cell reference.

    My additional comment was regarding a possible solution. It's not perfect, but it's unlikely that someone would have the same account, ownership, balance, account number, etc. So if you referenced all the values instead of just column A, it might avoid this.

    I tried
    HTML Code: 
    but that didn't exactly work. Then I got stuck and replied back to you.
    Attached Files Attached Files
    Last edited by duvius; 10-03-2014 at 04:32 PM.

  8. #8
    Registered User
    Join Date
    04-19-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: syntax to select cell in another sheet based on offset of active cell in current sheet

    This thread was reposted in Commercial and solved. Thanks everyone!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] save active sheet in new workbook, naming it as cell value of active sheet
    By arkharova.s in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-18-2014, 06:16 AM
  2. [SOLVED] read single cell content from sheet of closed file and put it in a cell on an active sheet
    By rsmith5413 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-09-2014, 04:16 AM
  3. [SOLVED] Macros to find matching text on other sheet and to select an offset cell
    By lottidotti in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-15-2012, 05:59 AM
  4. [SOLVED] VBA - Can I select a new active cell based on the value of the current active cell?
    By GrumpyOldBastard in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-08-2012, 07:05 PM
  5. Code to Select Current Active Sheet
    By JosueDG in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-14-2011, 02:50 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1