+ Reply to Thread
Results 1 to 7 of 7

Extraction of data from one sheet to another - reg

  1. #1
    Registered User
    Join Date
    07-24-2017
    Location
    INDIA
    MS-Off Ver
    2010
    Posts
    4

    Extraction of data from one sheet to another - reg

    Dear all,

    I need to extract some data from sheet 1 based on selected criteria on sheet 2. I have attached the excel for your reference.

    ******
    sheet 1 has overall data from which, Selected criteria Bolts in sheet 2 should be identified and extracted for the corresponding project. If the selected item is not available in the project, it should return 0.

    thanks in advance.

    regards
    Bubalan
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    05-04-2017
    Location
    MALAYSIA
    MS-Off Ver
    2007
    Posts
    34

    Re: Extraction of data from one sheet to another - reg

    I propose use pivot table

  3. #3
    Registered User
    Join Date
    07-24-2017
    Location
    INDIA
    MS-Off Ver
    2010
    Posts
    4

    Re: Extraction of data from one sheet to another - reg

    I think Pivot table cannot be used , since there will be blank cells and some rows inserted in the future

  4. #4
    Registered User
    Join Date
    05-04-2017
    Location
    MALAYSIA
    MS-Off Ver
    2007
    Posts
    34

    Lightbulb Re: Extraction of data from one sheet to another - reg

    See attached file as sample. You can play with pivot table to achieve your target

  5. #5
    Registered User
    Join Date
    07-24-2017
    Location
    INDIA
    MS-Off Ver
    2010
    Posts
    4

    Re: Extraction of data from one sheet to another - reg

    thanks , will check that

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: Extraction of data from one sheet to another - reg

    Hello bubalan and Welcome to Excel Forum.
    Here is a formula based solution.
    1st step is to input missing values in column C of sheet 1.
    2nd step is to produce unique lists of projects and items in columns XFC:XFD using the fomula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    3rd step is to assign a dynamic named range (DRange) to the unique item list using the formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    4th step is to put the following array entered formula* in column B of sheet 2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    5th step is to assign the source of the data validation for cell D1 of sheet 2 to: =DRange
    6th step is to put the following formula in column C of sheet 2: =IF(B3="","",D$1)
    7th step is to populate D3:F7 of sheet 2 with the formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    *Array entered formulas are confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  7. #7
    Registered User
    Join Date
    07-24-2017
    Location
    INDIA
    MS-Off Ver
    2010
    Posts
    4

    Re: Extraction of data from one sheet to another - reg

    Thanks man. i have tried a vba code, please find below:

    Sub Update()

    Application.Worksheets("General").Activate



    '*****identifying row numbers
    For j = 4 To ActiveSheet.Range("C" & Rows.Count).End(xlUp).Row

    a = Cells(j, 3)

    If Cells(j, 3) <> "" Then
    Cells(j, 4) = Sheets("Sectionwise").Range("B:B").Find(a).Row

    Cells(j, 5) = (Sheets("Sectionwise").Range("B:B").Find(a).End(xlDown).Row) - 1
    Else

    End If

    Next j
    '**********identifying row number of department
    Dim I As Integer


    For I = 4 To Sheets("Sectionwise").Range("C" & Rows.Count).End(xlUp).Row

    b = Cells(2, 3)

    x = Cells(I, 4)

    If IsEmpty(x) = True Then GoTo department

    y = Cells(I, 5)
    Rx = "C" & x
    Ry = "C" & y

    temp_range = Rx & ":" & Ry

    Worksheets("Sectionwise").Activate
    With Sheets("Sectionwise")
    .Range(temp_range).Select
    End With
    Application.Worksheets("General").Activate



    On Error Resume Next
    Cells(I, 6) = ClearContents
    Cells(I, 6) = Worksheets("Sectionwise").Range(temp_range).Find(b).Row
    On Error Resume Next

    'Cells(j, 6) = temp_loc

    Worksheets(Cells(2, 3)).Activate
    department:
    Next I
    '********* populating manhour for corresponding department

    a = ActiveSheet.Range("C" & Rows.Count).End(xlUp).Row

    For k = 4 To a

    If Cells(k, 6) <> "" Then

    b = Cells(k, 6)

    For m = 7 To 27

    Cells(k, m) = Worksheets("Sectionwise").Cells(b, m)

    Next m

    Else

    For m = 7 To 27

    Cells(k, m) = ClearContents

    Next m

    End If

    Next k


    End Sub

+ 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. Copy Sheet of Data Based On Date Extraction
    By Garold in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-17-2016, 04:29 PM
  2. Data extraction from one sheet to another sheet by expiry date
    By binoos123 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-24-2014, 02:12 PM
  3. Web extraction sheet not working
    By cmb80 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-11-2013, 02:00 PM
  4. Data extraction from one sheet into another
    By Navin Agrawal in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-01-2013, 08:10 AM
  5. Multi-sheet Data Extraction Problem with variables
    By medzed101 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-31-2013, 03:45 PM
  6. multiple sheet data extraction question
    By Vekkor in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-10-2011, 08:03 PM
  7. sheet name extraction
    By f_mayr in forum Excel General
    Replies: 16
    Last Post: 07-07-2009, 03:25 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