+ Reply to Thread
Results 1 to 19 of 19

Issue with a dynamic cell linking/reference formula

  1. #1
    Registered User
    Join Date
    10-26-2016
    Location
    India
    MS-Off Ver
    Office 2013
    Posts
    7

    Issue with a dynamic cell linking/reference formula

    Hello - I wanted to use a formula which needs to take up values from a cell. Within the formula, the cell reference/linking is not working. I have given a link with a clear pic of the issue. Can someone please point out the issue or help me with a solution? Image link -> http://imgur.com/a/IxvxX

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,823

    Re: Issue with a dynamic cell linking/reference formula

    Welcome to the forum!

    We cannot work with images. Please attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,041

    Re: Issue with a dynamic cell linking/reference formula

    Will the target sheet be open or closed. If it is open, you can use INDIRECT. If it is closed there are other possibilities.

    Put both sheets in the same place (e.g. desktop). Keep "source" closed. Open "pull", enabling macros as you do so. Change the path in c2 to reflect the situation in your PC. it should work.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Registered User
    Join Date
    10-26-2016
    Location
    India
    MS-Off Ver
    Office 2013
    Posts
    7

    Re: Issue with a dynamic cell linking/reference formula

    The target/source sheet will be closed. Thanks, I am trying to use your attachments. Will keep you posted.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,041

    Re: Issue with a dynamic cell linking/reference formula

    Yes, silly me... source sheet.

  6. #6
    Registered User
    Join Date
    10-26-2016
    Location
    India
    MS-Off Ver
    Office 2013
    Posts
    7

    Re: Issue with a dynamic cell linking/reference formula

    I have added an excel sheet example clearly highlighting the issue. Pls take a look.
    Attached Files Attached Files

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,041

    Re: Issue with a dynamic cell linking/reference formula

    Were you able to use the "Pull" attachments to return values from "Source"?

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,041

    Re: Issue with a dynamic cell linking/reference formula

    I have now added the VBA code in Module 1 of your own sheet. The UDF "Pull" will now be available in your own sheet. Were you applying just the formula to your own sheet, wothout copying the code over? If so, you were going too far, too soon!!
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    10-26-2016
    Location
    India
    MS-Off Ver
    Office 2013
    Posts
    7

    Re: Issue with a dynamic cell linking/reference formula

    Quote Originally Posted by Glenn Kennedy View Post
    Were you able to use the "Pull" attachments to return values from "Source"?
    Yeah, I tried it. But the purpose of it is different and so not helping my case. So to make it clear, I have attached the excel itself this time. Pls do take a look at the attachment.
    Attached Files Attached Files

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,041

    Re: Issue with a dynamic cell linking/reference formula

    One of my posts has vanished!!! Try this on your PC. Enable macros...
    Attached Files Attached Files

  11. #11
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,041

    Re: Issue with a dynamic cell linking/reference formula

    So. I put "source" in a folder called Temp, which was on my desktop.

    I used the amended PULL formula:
    =pull("'C:\Users\Windows 8\Desktop\"&A2&"\[source.xlsx]Sheet1'!a1")

    where A2 contains the folder name temp.

    Do the same. Amend \Users\Windows 8\ to suit your situation. It DOES work... It returns the value in A1 of the closed Source sheet using the folder name taken from another cell.

  12. #12
    Registered User
    Join Date
    10-26-2016
    Location
    India
    MS-Off Ver
    Office 2013
    Posts
    7

    Re: Issue with a dynamic cell linking/reference formula

    Quote Originally Posted by Glenn Kennedy View Post
    So. I put "source" in a folder called Temp, which was on my desktop.

    I used the amended PULL formula:
    =pull("'C:\Users\Windows 8\Desktop\"&A2&"\[source.xlsx]Sheet1'!a1")

    where A2 contains the folder name temp.

    Do the same. Amend \Users\Windows 8\ to suit your situation. It DOES work... It returns the value in A1 of the closed Source sheet using the folder name taken from another cell.
    Thanks a lot for this This almost solved it. Its just that it perfectly works for the first row. When I drag it for more number of rows, the cell name is not auto-populating in an incremental manner. That is: Cell E2 is not becoming E3, E4, E5 when copied to multiple rows. Thanks a ton!!!!!!!!!!!

  13. #13
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,041

    Re: Issue with a dynamic cell linking/reference formula

    You never asked for E2 to become E3, etc... that's why it doesn't increment. look back in a couple of minutes...

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,823

    Re: Issue with a dynamic cell linking/reference formula

    Maybe this:

    =pull("'C:\Users\Windows 8\Desktop\"&A2&"\[source.xlsx]Sheet1'!a"&ROWS($A$1:A1))

  15. #15
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,041

    Re: Issue with a dynamic cell linking/reference formula

    Put this in A2 and drag down...

    =Pull("'C:\Users\aravind.WIN10HP360\Desktop\beads\extract\" & G2 & "\[live_inventory.xlsx]live_inventory'!E"& ROWS($A$2:A2)+1)

  16. #16
    Registered User
    Join Date
    10-26-2016
    Location
    India
    MS-Off Ver
    Office 2013
    Posts
    7

    Re: Issue with a dynamic cell linking/reference formula

    Quote Originally Posted by Glenn Kennedy View Post
    Put this in A2 and drag down...

    =Pull("'C:\Users\aravind.WIN10HP360\Desktop\beads\extract\" & G2 & "\[live_inventory.xlsx]live_inventory'!E"& ROWS($A$2:A2)+1)
    Sir, you are awesome!!! It works great Thank you very much...It is going to save me atleast a 100 hours totally

  17. #17
    Registered User
    Join Date
    10-26-2016
    Location
    India
    MS-Off Ver
    Office 2013
    Posts
    7

    Re: Issue with a dynamic cell linking/reference formula

    Quote Originally Posted by AliGW View Post
    Maybe this:

    =pull("'C:\Users\Windows 8\Desktop\"&A2&"\[source.xlsx]Sheet1'!a"&ROWS($A$1:A1))
    Thank you very much! Worked as well

  18. #18
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,041

    Re: Issue with a dynamic cell linking/reference formula

    Glad to have helped.

  19. #19
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,823

    Re: Issue with a dynamic cell linking/reference formula

    What he said!

+ 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] Replace a cell reference in a formula with dynamic reference
    By jkj115 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-25-2016, 11:04 AM
  2. Cell reference issue when copying formula down
    By Joon16 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-24-2016, 10:37 AM
  3. [SOLVED] Creating the OFFSET formula with a dynamic reference cell
    By jmillikan in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-21-2015, 04:05 PM
  4. [SOLVED] inserting a formula with a dynamic cell reference
    By mashley in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-17-2015, 02:56 PM
  5. Dynamic Formula Ranges with reference to values in another cell
    By dunda1985 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-17-2011, 05:08 AM
  6. Replies: 0
    Last Post: 06-16-2011, 09:46 AM
  7. Dynamic Cell Reference in VBA Formula
    By mworonuk in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-26-2009, 01:41 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