+ Reply to Thread
Results 1 to 8 of 8

extracting data into relevant fields

  1. #1
    Registered User
    Join Date
    11-19-2013
    Location
    Wroclaw
    MS-Off Ver
    Excel 2003
    Posts
    23

    extracting data into relevant fields

    Hello,
    I need to extract values from "row data" to "Sheet1" with macro and "Sheet1" should like "desired format".
    So far, I have incomplete codes and I need to have all data I colored in red in "Sheet1".
    Thx,
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    11-19-2013
    Location
    Wroclaw
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: extracting data into relevant fields

    Sub test()
    Dim a, b, i As Long, ii As Long, iii As Long, n As Long, t As Long
    a = Sheets("Row Data").Range("b4").CurrentRegion.Value
    ReDim b(1 To UBound(a, 1), 1 To 6)
    For i = 3 To UBound(a, 1)
    If a(i, 5) <> "" Then
    n = n + 1
    For ii = 5 To 9
    b(n, ii - 4) = a(i, ii)
    Next
    iii = 1: t = 5
    Do While a(i + iii, 5) = ""
    If a(i + iii, 11) <> "" Then
    t = t + 1
    If UBound(b, 2) < t Then ReDim Preserve b(1 To UBound(b, 1), 1 To t)
    b(n, t) = "'" & a(i + iii, 11)
    End If
    iii = iii + 1
    If i + iii > UBound(a, 1) Then Exit Do
    Loop
    iii = i + iii - 2
    End If
    Next
    Sheets("Sheet1").Cells(1).Resize(n, UBound(b, 2)).Value = b
    End Sub

  3. #3
    Registered User
    Join Date
    11-19-2013
    Location
    Wroclaw
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: extracting data into relevant fields

    Please Login or Register  to view this content.

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: extracting data into relevant fields

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-19-2013
    Location
    Wroclaw
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: extracting data into relevant fields

    Hello jindon,
    Can you please re-arrange the code for the new attachment? This time, we added "Supplier name" column and changed the place of some other columns.
    Thx,
    Attached Files Attached Files
    Last edited by yalcinbican; 06-30-2017 at 01:35 AM.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: extracting data into relevant fields

    I don't like the way you ask questions.

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: extracting data into relevant fields

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  8. #8
    Registered User
    Join Date
    11-19-2013
    Location
    Wroclaw
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: extracting data into relevant fields

    Hello jindon,
    Macro is not showing full results. I had 7 calculations in the old report and macro returned 4 calculations.
    When I run your macro in the new report, out of 67 calculations, macro returned only 10 calculations.
    Could you please have a look at it?
    Thx,

+ 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. [SOLVED] extracting data into relevant fields
    By yalcinbican in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-01-2017, 03:30 PM
  2. Extracting Certain Fields from XML File to Excel - PLEASE HELP!!!
    By pritchard.ev in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-08-2017, 01:05 AM
  3. Replies: 7
    Last Post: 05-23-2013, 05:20 PM
  4. Replies: 3
    Last Post: 05-01-2013, 09:25 PM
  5. [SOLVED] Excel 2007 : Extracting numbers into text fields
    By pennywaltz in forum Excel General
    Replies: 2
    Last Post: 06-18-2012, 04:57 PM
  6. Extracting Word Custom Fields to Excel
    By kevin.carbonaro in forum Excel General
    Replies: 0
    Last Post: 10-11-2011, 05:21 AM
  7. macro for Extracting relevant data from an excel database
    By cbhawsar in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-22-2011, 11:50 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