+ Reply to Thread
Results 1 to 4 of 4

Fetching value from another sheet for next 9 months if the month changes

  1. #1
    Registered User
    Join Date
    04-07-2020
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    45

    Fetching value from another sheet for next 9 months if the month changes

    Hi,

    I am looking for a formula in which i need to select a month in cell G3 and months for TYPE 1 and TYPE 2 should change in G6 and G14. Next months should follow the sequence.

    Once months are changed, it should fetch respective value from REFERENCE sheet through index match or vlookup.

    Thank you,
    Attached Files Attached Files

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Fetching value from another sheet for next 9 months if the month changes

    Please try at G6

    =EDATE($G$3,COLUMNS($G6:G6)-1)
    Attached Files Attached Files
    Last edited by Bo_Ry; 08-20-2020 at 08:49 AM.

  3. #3
    Registered User
    Join Date
    04-07-2020
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    45

    Re: Fetching value from another sheet for next 9 months if the month changes

    Thanks, it works for changing the month in G6, but if i select november in G3, so months in ROW 6 should become November 2020 to July 2021.

    and their respective value for each type in that month should be fetched from REFERENCE sheet.

  4. #4
    Forum Contributor
    Join Date
    03-18-2014
    Location
    Singapore
    MS-Off Ver
    Excel 2016 / 2019
    Posts
    251

    Re: Fetching value from another sheet for next 9 months if the month changes

    Hi,

    G6 and G14 both = G3,
    H6, =EDATE(G6,1) copy all to the right
    H14, =EDATE(G14,1) copy all to the right


    then use Index, Match (Horizontal), Match (vertical)

    At G7, drag right and down the following formula

    =IF(INDEX(Reference!$E$5:$R$10,MATCH($F7,Reference!$D$5:$D$10), MATCH(G$6,Reference!$E$4:$R$4))=0, "",INDEX(Reference!$E$5:$R$10,MATCH($F7,Reference!$D$5:$D$10), MATCH(G$6,Reference!$E$4:$R$4)))

    At G15 drag right and down the following formula
    =IF(INDEX(Reference!$E$13:$R$15,MATCH($F15,Reference!$D$13:$D$15), MATCH(G$14,Reference!$E$12:$R$12))=0,"",INDEX(Reference!$E$13:$R$15,MATCH($F15,Reference!$D$13:$D$15), MATCH(G$14,Reference!$E$12:$R$12)))
    Attached Files Attached Files
    Christopher Yap

+ 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: 8
    Last Post: 03-28-2020, 12:47 PM
  2. Vba to filter current month, prior month, two months ago and three months ago
    By M7A0S8T8E5R in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2019, 06:56 PM
  3. Count how many dates are this month, 2 months and 3 months old
    By jimmisavage in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-21-2017, 09:21 AM
  4. Replies: 0
    Last Post: 07-22-2013, 11:46 AM
  5. Macro using vlookups comparing 2 months paysheet(previous month and current month)
    By srinivasan1965 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-07-2012, 03:45 AM
  6. Replies: 1
    Last Post: 11-22-2011, 08:11 AM
  7. Need to Autofill 'Months' in sheet by entering starting month
    By Brian Diesel in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-06-2007, 07:29 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