+ Reply to Thread
Results 1 to 2 of 2

Vlookup formula plus some small cells management

  1. #1
    Registered User
    Join Date
    07-12-2016
    Location
    london, england
    MS-Off Ver
    Office plus 2010
    Posts
    48

    Vlookup formula plus some small cells management

    Hi everyone,

    Thanks in advance for taking time to have a look at this.

    So I have two different excel workbooks. The first workbook (workbook 1) has three columns (D, E and F) with the same number of data point (rows 4 to 23 and 26 to 35) and other 9 columns (G to O) with data from rows 26 to 35. On top of each column there is a date: t (date of last entries), t-1 month, t-12 months. I put some random dates as an example in the first rows. The second workbook (workbook 2) has one worksheet for each of the areas you see labeled as "Section #"

    The data points below "12/23/2017" in workbook 1 date have to be put in manually (not by the macro) every month and the corresponding date has to change to today (in this case assume 1/23/2018), while the datapoints below the "t-1" and "t-12" have to do a vlookup in the "workbook 2" matching the dates with the old entries (this has to be done by the macro)

    The process should be as follows

    0) the sheet as you see it was last updated on 12/23/2017. today, 1/23/2018, I want to update the sheet. I go ahead and delete the entry in D3 with the new date (1/23/2018); all the rest should adjust manually

    1) I put in the new data corresponding to the new date

    2) once that is done, I need to activate the macro

    The macro should do the following:

    1)copies all data points for each of the 5 sections that are under the most recent date (which changed to 1/23/2018 in this case) in the respective worksheet per section. for example, D4:D23 in workbook 1 have to be copied in C2:C22 of workbook 2, sheet section 1. When the data are pasted, I need the macro to make space for them without deleting the latest entries. In the same example, I need workbook 2, sheet 1, to move to the right by one column all the entries in the area C2:N22. This way I make the C2:C22 free for the new entries. this applies to all the other sheets in workbook 2 as well

    2) once that is done, I need the macro to identify the data points per each section corresponding to the new dates you can find in workbook 1, which adjust automatically. For example, Once I change D3, E3 and F3 will change automatically to 12/23/2017 (E3) and 11/23/2017 (F3). I want the macro to look up the values corresponding to 12/23/2017 and 11/23/2017 in workbook 2. So in this case the macro should copy paste C3:C22 (remember the date changed!) from workbook 2 into E4:E23 in workbook 1. same applies for N3:N22 of workbook 2 into F4:F23 into workbook 1.

    3) the process has to be done for each of the sections, from 1 to 5, which all have their dedicated history sheet in workbook 2

    This is it. Let me know if something is unclear. attached are the sample workbooks
    Attached Files Attached Files
    Last edited by AliGW; 02-05-2018 at 01:03 PM. Reason: Title amended - everyone's requests for help are important.

  2. #2
    Registered User
    Join Date
    07-12-2016
    Location
    london, england
    MS-Off Ver
    Office plus 2010
    Posts
    48

    Re: Vlookup formula plus some small cells management

    Please if you find the explanation unclear, let me know and I will try to facilitate.

+ 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. Replies: 2
    Last Post: 05-14-2015, 12:31 PM
  2. [SOLVED] VBA instead of index small or vlookup formula
    By cajand in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-25-2014, 05:29 PM
  3. IF Statement and Vlookup Formula....something small missing!! HELP!
    By Nicole Matthews in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-22-2014, 11:34 AM
  4. Replies: 2
    Last Post: 06-20-2012, 12:22 PM
  5. Replies: 3
    Last Post: 03-21-2012, 05:45 PM
  6. Need help with a small formula and referencing cells
    By normanp in forum Excel General
    Replies: 4
    Last Post: 07-21-2009, 02:44 AM
  7. IMPORTANT! HELP PLEASE! Formula
    By babiigirl in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-14-2006, 03:10 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