+ Reply to Thread
Results 1 to 14 of 14

VBA Code for auto updating information on a sheet with information from another sheet

  1. #1
    Forum Contributor Nitro2481's Avatar
    Join Date
    09-09-2014
    Location
    Laois, Ireland
    MS-Off Ver
    2013
    Posts
    323

    VBA Code for auto updating information on a sheet with information from another sheet

    Hi Guys,

    Not sure if this is possible but in my attached sheet I have 1 sheet (sheet 1 "fruit") of customers buying fruit, 1 sheet (Sheet 2 "Veg") of customers buying veg, and a summary sheet of them both (Sheet 3) In an attempt to save time & prevent double inputting I was looking for some code that would allow me update the third sheet automatically when first or second sheet is up dated. So basically the code I need in English is
    Please Login or Register  to view this content.
    Hope you can make sense of it.
    Thanks in advance
    Attachment 437355Book1.xls

  2. #2
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: VBA Code for auto updating information on a sheet with information from another sheet

    for sheets Fruit and veg code in Sheet_Change


    Kind regards
    Leo
    Attached Files Attached Files

  3. #3
    Forum Contributor Nitro2481's Avatar
    Join Date
    09-09-2014
    Location
    Laois, Ireland
    MS-Off Ver
    2013
    Posts
    323

    Re: VBA Code for auto updating information on a sheet with information from another sheet

    Hi Leo,

    I messed up. I thought if I gave you a simple version I wold be able to amend it to suit my sheet. It is actually a lot more complicated to read than I expected. I have attached an amended sheet. This example uses the exact columns I need changed and also sheet 2 & 3 are both updated from sheet 1, (my mistake earlier saying sheet 3 was updated from sheet 1 & 2.
    eg. Goofy bought both fruit & Veg. So as soon as I put Money in sheet 1 it automatically updates sheet 2 & 3 but as Daisy only bought Fruit it only automatically updates sheet 2.
    Ps for the record what I incorrectly asked for, your answer done it exactly.

    Thanks again and apologies for mix up
    Book2.xls

  4. #4
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: VBA Code for auto updating information on a sheet with information from another sheet

    how goes the update now ?
    formulas ? other code ?

    hard to make second part without vieuw of the first part

    Kind regards
    Leo

  5. #5
    Forum Contributor Nitro2481's Avatar
    Join Date
    09-09-2014
    Location
    Laois, Ireland
    MS-Off Ver
    2013
    Posts
    323

    Re: VBA Code for auto updating information on a sheet with information from another sheet

    Hi Leo,

    Not really sure I understand your question. This is the code I currently have in my sheet (equivalent to the fruit/veg sheet)

    Please Login or Register  to view this content.
    This allows the information transfer to sheet 2 & 3. I'd like now to be able to update that information afterwards

  6. #6
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: VBA Code for auto updating information on a sheet with information from another sheet

    so this one only updates after payment is done

    Kind regards
    Leo
    Attached Files Attached Files

  7. #7
    Forum Contributor Nitro2481's Avatar
    Join Date
    09-09-2014
    Location
    Laois, Ireland
    MS-Off Ver
    2013
    Posts
    323

    Re: VBA Code for auto updating information on a sheet with information from another sheet

    Hi Leo

    I have made the following changes and not sure I'm right
    Please Login or Register  to view this content.
    The first red ones are 28 which is the column in which the trigger word "block" is
    I renamed sheet two to the actual name Banc ***
    & Issued is the word I want put into J Sheet 2.
    Same changes on sheet 3
    Error is "Cant execute code in break mode". Error happens when I put the date in Sheet 2 column X with Sheets("Banc ***").Range("J" & lr) = "Issued" This seems to be the line causing the error highlighted in yellow

    Matt

  8. #8
    Forum Contributor Nitro2481's Avatar
    Join Date
    09-09-2014
    Location
    Laois, Ireland
    MS-Off Ver
    2013
    Posts
    323

    Re: VBA Code for auto updating information on a sheet with information from another sheet

    I have just used your exact formula in the test sheet attached and I am getting the below in red is coming up as a runtime error 9 Subscript out of range

    Everything in Blue would be already there until I put a price & date in Sheet 1.

    Please Login or Register  to view this content.
    Thanks a mil for your patience
    Book2.xls

  9. #9
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: VBA Code for auto updating information on a sheet with information from another sheet

    excel file with the real sheet names and real values in columns would help to help you

    Kind regards
    Leo

  10. #10
    Forum Contributor Nitro2481's Avatar
    Join Date
    09-09-2014
    Location
    Laois, Ireland
    MS-Off Ver
    2013
    Posts
    323

    Re: VBA Code for auto updating information on a sheet with information from another sheet

    Here you go Leo

    To Save time I have just input the bare minimum. To open Type Manager as user& secret as password

    Sheet 1 Mort figs
    Sheet 2 Banc ***
    Sheet 3 Home Ins

    When I type in customer details in sheet 1 and I pick block in column AB the details transfer over to sheet 2
    When I type in customer details in sheet 1 and I pick block in column AC the details transfer over to sheet 3
    This all works perfectly. Everything in sheet 2 & 3 is directly because of "Block" in Sheet 1.

    What I want to do is as soon as a customer gets their cheque I input their details in sheet 1 column w and the date in sheet 1 column x. Eg attached is Mickey Mouse got a cheque for €200k 17/12/15. As a result of this cheque issuing this automatically begins the Life & home Insurance policies.

    As soon as I do this I would like the same customer (if in sheet 2 ) to be up dated in row J from "Sent Up" to "Issued" and the date from sheet 1 to go to sheet 2 column k
    & If the same customer is also/or in sheet 3 I want column J to change from "Sent Up" to "Issued" and the date from sheet 1 to go to sheet 3 column k

    Skeleton Tracker.zip
    Last edited by Nitro2481; 12-30-2015 at 04:50 AM.

  11. #11
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: VBA Code for auto updating information on a sheet with information from another sheet

    Try this, extra code for update after payment

    Please Login or Register  to view this content.
    Kind regards
    Leo

  12. #12
    Forum Contributor Nitro2481's Avatar
    Join Date
    09-09-2014
    Location
    Laois, Ireland
    MS-Off Ver
    2013
    Posts
    323

    Re: VBA Code for auto updating information on a sheet with information from another sheet

    Hi Leo,

    Think we are 99% of the way there. Works perfect with Mickey,Goofy, Pluto who have both life insurance & Home Insurance
    However if I pick Minnie who has no life insurance I get a run error 1004 "Application-Defined or object-defined error
    and if I pick Donald who has no house insurance the sheet 2 works correctly but on sheet 3 it transfers the information to the next available blank line as there is no Donald on that one. Is there a way of building into the code only transfer to sheet to if sheet 1 column AB says block and only transfer to sheet 3 if sheet 1 column AC says block.

    Really appreciate your help.

  13. #13
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: VBA Code for auto updating information on a sheet with information from another sheet

    Time is up for now, so cant test but maybe

    change this
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    2 times ( also for range AC )

    otherwise i see later this day


    Kind regards
    Leo

  14. #14
    Forum Contributor Nitro2481's Avatar
    Join Date
    09-09-2014
    Location
    Laois, Ireland
    MS-Off Ver
    2013
    Posts
    323

    Re: VBA Code for auto updating information on a sheet with information from another sheet

    Leo,

    Thank you so much. This seems to have done the trick. Thanks so much for your patience
    Matt

+ 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] Enter information on one sheet based on the information in another sheet in the same wkbk
    By slindfors in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-19-2015, 03:16 PM
  2. Auto Complete Fields in Sheet 1 based on Sheet 2 information
    By Heather0240 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-09-2015, 02:19 PM
  3. [SOLVED] Auto populate one sheet using new information on another sheet
    By Phonics in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 09-09-2014, 06:49 PM
  4. Hiding specific column and updating information on another sheet.
    By ajitexcelfourm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-31-2014, 03:57 AM
  5. Macro to Pull information from one Excel Sheet based on information in another sheet
    By IwannabanExcelGod in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-20-2013, 02:11 PM
  6. [SOLVED] Auto Macro the pulls data from on sheet, prints on another sheet, then deletes information
    By wjwelch1 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-06-2013, 01:54 PM
  7. Using User form to filter information based on information on sheet
    By nikadon in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-04-2013, 04:43 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