+ Reply to Thread
Results 1 to 9 of 9

Link 2 cells on different workbooks

  1. #1
    Registered User
    Join Date
    08-24-2018
    Location
    Northern Ireland
    MS-Off Ver
    2010
    Posts
    23

    Link 2 cells on different workbooks

    Hi I have a problem trying to link 2 cells on different workbooks.
    I have workbook 1 which has sheet 1 as blank invoice with a bit of vba run by clicking a button.
    Sheet 2 is a customer database populated with data when sheet 1 button has been clicked.
    Workbook 2 is an invoice generated by sheet 1 when the button is clicked on the first workbook and saved in a folder on C:
    On workbook 1 sheet 2 (customer database) I have a string of code (view invoice) which when clicked will open the related invoice from the C: drive folder.

    Now to my problem, I need to have a cell on the customer database change when I update a cell in the generated invoice (total) i.e. I have to change the cost and this change will automatically update the cell with the cost in workbook 1 sheet 2 ( customer database)
    I need this link to be linked to the relevant invoice since the database will move down a line as each invoice is generated.
    Can this be done? I have looked at using hyperlinks but I have to manually add it to each line in the database.

    Hopefully you can understand what I'm trying to explain

    Thanks William

  2. #2
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: Link 2 cells on different workbooks

    Is there a list of saved invoices in a column and you want to have a hyperlinks in adjacent columns to open the invoices?
    Teach me Excel VBA

  3. #3
    Registered User
    Join Date
    08-24-2018
    Location
    Northern Ireland
    MS-Off Ver
    2010
    Posts
    23

    Re: Link 2 cells on different workbooks

    Hi Imran, no I already have that working. I need the cost to change in the database when I make a change to an invoice.
    I have linked the invoice in the database to the relevant invoice in C: by using the concantanate function��

  4. #4
    Registered User
    Join Date
    08-24-2018
    Location
    Northern Ireland
    MS-Off Ver
    2010
    Posts
    23

    Re: Link 2 cells on different workbooks

    I open workbook 1 and fill in the details for my invoice.
    I click a button and it saves the invoice to a folder on C: using the name and invoice no as file name.
    The details are copied across to sheet 2 (database)
    The template invoice is then wiped and the invoice no has increased by 1 ready for the next invoice.
    When the next invoice has been generated same thing only the details are filled into the database on the next empty line thus building my database.
    When the details are copied to the database I have "view invoice" at the end of that line. When I click that it opens the relevant invoice.
    It's at this point I need help. When the invoice has been opened and total updated I need it to automatically update on the same customer details in the database.
    Hope that helps

  5. #5
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: Link 2 cells on different workbooks

    OK,

    That easy if you have a unique identifier for each invoice. Just search that unique key in the in the database and edit that row.

    Your situation is understood but unable to right any code without actually reviewing your sample book as to where to find that keyword etc. and then sending the current (edited invoice) data to that row of database.

  6. #6
    Registered User
    Join Date
    08-24-2018
    Location
    Northern Ireland
    MS-Off Ver
    2010
    Posts
    23

    Re: Link 2 cells on different workbooks

    Cheers Imran,

    when I click on view invoice in workbook 1 sheet "customer database" it will open the invoice relevant to that line. I don't have to look for it. maybe if you see my code it might make things easier.
    Can I paste code or is it against forum rules?

  7. #7
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: Link 2 cells on different workbooks

    Of course you can paste the code but remember to add code tags

    select your code and click on the # button in the toolbar.

  8. #8
    Registered User
    Join Date
    08-24-2018
    Location
    Northern Ireland
    MS-Off Ver
    2010
    Posts
    23

    Re: Link 2 cells on different workbooks

    Cheers new to all this lol

    here goes,

    Please Login or Register  to view this content.
    2nd bit of code on customer database.

    Please Login or Register  to view this content.
    G32 is the relevant invoice on the customer database and will change as each new invoice is added.

    hopefully that makes sense lol.

  9. #9
    Registered User
    Join Date
    08-24-2018
    Location
    Northern Ireland
    MS-Off Ver
    2010
    Posts
    23

    Re: Link 2 cells on different workbooks

    new point

    I have used this code which works as intended but 2 things, I need it to run along with the above code and also the relevant no (H25) to change so that it relates to the correct invoice E.G. h26,h27 etc each time a new invoice is generated.

    Please Login or Register  to view this content.

+ 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] best way to link cells from other worksheets/workbooks
    By r9thomas in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-20-2018, 08:51 AM
  2. Finding Cells that link to other workbooks
    By RichardBerry in forum Excel General
    Replies: 3
    Last Post: 10-08-2007, 06:47 AM
  3. [SOLVED] Link and fill cells in workbooks
    By Larry in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-22-2006, 11:10 AM
  4. [SOLVED] Link and auto-populate cells in workbooks
    By Larry in forum Excel - New Users/Basics
    Replies: 0
    Last Post: 06-22-2006, 11:00 AM
  5. [SOLVED] How to link cells in two workbooks that change daily?
    By Doc Adams in forum Excel General
    Replies: 2
    Last Post: 05-14-2006, 03:50 PM
  6. [SOLVED] how do I link cells between two different two different workbooks.
    By Aaron The Young in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-22-2006, 01:35 PM
  7. Replies: 2
    Last Post: 09-21-2005, 07:05 AM

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