+ Reply to Thread
Results 1 to 7 of 7

Data Extraction for Multiple Column (Formula or Macro)

  1. #1
    Registered User
    Join Date
    09-17-2012
    Location
    Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    4

    Data Extraction for Multiple Column (Formula or Macro)

    Hello Everyone.

    I have one excel file which contain four sheets. Sheet A, B, C, D. In each sheet there are different rates for F, G, H, I.
    I want to extract these rates in different sheet when i select "A" in Column A from drop down menu and "F" in column "B". It should pick vale from Sheet A and for F and if i select B and F it should pick value from sheet B and for F.
    It's working for single sheet with if and vlookup but when i include another one it's not working. Can anyone help plz

  2. #2
    Valued Forum Contributor
    Join Date
    05-08-2012
    Location
    Georgia, USA
    MS-Off Ver
    Excel 2003, 2010
    Posts
    811

    Re: Data Extraction for Multiple Column (Formula or Macro)

    The drop down menu is done via DATA VALIDATION

    What you are asking can be done via HLOOKUP, VLOOKUP, or MATCH and INDEX

    Sample data is recommended
    ===========================
    I suspect the reason the formula works on one sheet and not between sheets is the formula does not include the Worksheet Name in the formula
    Last edited by K m; 09-17-2012 at 02:30 PM.
    Click on star (*) below if this helps

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Data Extraction for Multiple Column (Formula or Macro)

    if you want to use a drop-down, and the items to be included in it are on another sheet, then you need to 1st give the items for the drop-down a name range. then in data validation, use "list" and then use =the-name-you-gave-the-range
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Valued Forum Contributor
    Join Date
    05-08-2012
    Location
    Georgia, USA
    MS-Off Ver
    Excel 2003, 2010
    Posts
    811

    Re: Data Extraction for Multiple Column (Formula or Macro)

    FDibbins is correct. Data Validation works between sheets ONLY when Named Ranges are used

  5. #5
    Registered User
    Join Date
    09-17-2012
    Location
    Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Data Extraction for Multiple Column (Formula or Macro)

    I have attached both sheets. "Data for import" is used for extracting data and the second sheet is for solution.
    I want to select unit and type in solution sheet and rates will be imported from "Data for import" sheet.

    I am using this function for single but its not working for multiple sheets
    =IF(A2=Sheet2!B2,(VLOOKUP('For Solution'!B2,'[Data for Import.xlsx]A'!$A$1:$B$3,2)))
    Attached Files Attached Files
    Last edited by sumairaashraf; 09-17-2012 at 04:03 PM.

  6. #6
    Registered User
    Join Date
    09-17-2012
    Location
    Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Data Extraction for Multiple Column (Formula or Macro)

    I am using If and Vlookup but it's not working for multiple sheets. Sample attached. Can you plz try on the attached sheets

  7. #7
    Registered User
    Join Date
    09-17-2012
    Location
    Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Data Extraction for Multiple Column (Formula or Macro)

    I am using this formula to extract for multiple sheets but its not working.

    IF(A2=Sheet2!B2,(VLOOKUP(Sheet1!B2,'[Data for Import.xlsx]A'!$A$1:$B$3,2,False),IF(Sheet1!A2=Sheet2!B3,(VLOOKUP(Sheet1!B2,'[Data for Import.xlsx]B'!$A$1:$B$3,2,False))))

    Any suggestion plz, It's a long list about 177, If i use only if function it doesn't make sense to use 177 in one cell. Plz Help
    Last edited by sumairaashraf; 09-17-2012 at 04:05 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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