+ Reply to Thread
Results 1 to 7 of 7

Extract data from table

  1. #1
    Forum Contributor
    Join Date
    05-16-2018
    Location
    SG
    MS-Off Ver
    2013
    Posts
    217

    Extract data from table

    Hi

    I could use some assistance on 2 formulas as on my attached file.

    1. in Sheet1 - On cell C2, I need the yellow highlighted cell to extract the figure that is indicated on the table in sheet2 based on the current month that is indicated on sheet1 on cell B2. the answer would be 54269.
    2. in sheet 1 - on cell C6, i need the green highlighted cell to extract the figure that is indicated on the table in sheet2 based on the month and year that is selected on sheet1 cell B6. The selection should be based on the months and years that are indicated on the columns that are in sheet2. For example if jan 2018 is selected than the answer would be 16639.01
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Extract data from table

    In C2

    =INDEX(Sheet2!$B$4:$G$15,MATCH(TEXT(TODAY(),"mmmm"),Sheet2!$A$4:$A$15,0),MATCH(YEAR(TODAY()),Sheet2!$B$3:$G$3,0))

    Similar in C6

    =INDEX(Sheet2!$B$4:$G$15,MATCH(TEXT(B6,"mmmm"),Sheet2!$A$4:$A$15,0),MATCH(YEAR(B6),Sheet2!$B$3:$G$3,0))

  3. #3
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Extract data from table

    =INDEX(Sheet2!$B$4:$G$15,MATCH(MID(B2,1,LEN(B2)-6),Sheet2!$A$4:$A$15,0),MATCH(RIGHT(B2,4)+0,Sheet2!$B$3:$G$3,0))
    Try below
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Extract data from table

    In C2
    Please Login or Register  to view this content.
    In C6
    Please Login or Register  to view this content.
    In B6 date entered 1/1/2018 and formatted for Custom->>Mmmm, YYYY
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  5. #5
    Forum Contributor
    Join Date
    05-16-2018
    Location
    SG
    MS-Off Ver
    2013
    Posts
    217

    Re: Extract data from table

    Thanks all it worked perfect

  6. #6
    Forum Contributor
    Join Date
    05-16-2018
    Location
    SG
    MS-Off Ver
    2013
    Posts
    217

    Re: Extract data from table

    Hi, can i have one more guide on this thread. If cell B3 just had the year, and i want to retrieve the average of that year from the table in sheet2. How can i amend the below formula

    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Extract data from table

    IF you have averages in Row 16 of Sheet2 try below formula in "C2" of sheet1

    =INDEX(Sheet2!$B$16:$G$16,MATCH(B2,Sheet2!$B$3:$G$3,0))

+ 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. Using VBA in Excel macro to extract data from table and reconstruct table
    By pbentonh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-11-2017, 04:03 PM
  2. [SOLVED] vba code to extract data from data table and update data sheet
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-25-2017, 01:23 PM
  3. Extract data from table into new table that matches multiple criteria
    By joplrw10 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-25-2016, 12:30 PM
  4. Extract html table data from specifi table only
    By hcyeap in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-26-2016, 02:34 PM
  5. Extract data from table
    By etaver87 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-21-2016, 10:23 AM
  6. [SOLVED] Extract data from a Table
    By RASIKA99 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-11-2014, 07:41 AM
  7. Extract data from a Table
    By RASIKA99 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-14-2014, 01:26 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