Results 1 to 3 of 3

matching data with header and place it below its header

Threaded View

  1. #1
    Registered User
    Join Date
    05-11-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    37

    matching data with header and place it below its header

    Hi friends i have a program where there are 3 files i.e., 1 .csv file, 1 master file and report generator file.. im importing data from .csv file and populating it in master file after report has been generated. im including 3 sample files for your understanding. n report generator i have to give the condition likewhich col in .csv has to be splitted and on which columns it has to be populated. there i have given D,E,F:D.... so i done splitting accoding to that but im having problem if the characters given in this column does not match with the strings in .csv suppose i gave D,E,F:D but in .CSV the data is only 2strings like Passed;Withheld so im getting exception here. how to check the condition in my code like if the both are equal then the code has to be executed otherwise it has to be filled with blank ....please help me
    and i have another problem when working with this splitting...
    I need to place the splitted columns under matched header only that is.,
    Passed has to be under Passed Failed to be under Failed like this ..... Please please help me guys i had stuck here...

        Dim arrval, arrval2 As Variant
                  Dim a1, a2 As String
                  Dim x, y, CompareRange As Variant
                      Workbooks(sCSVfile).Sheets(sCSVsheet).Range(ssplitColFROM(iFROMs + 1) & lRow) = arrSplitText(i)
                  CompareRange = ActiveWorkbook. _
                  ActiveSheet.Range("D1:F1").Value
                  x = arrSplitText(i)
                  For Each x In Selection
                  For Each y In CompareRange
         
                  If x <> y Then ActiveWorkbook.ActiveSheet.ActiveCell.Offset(0, 1) = x
                 
                 Next y
               
               Next x
                  i = i + 1
    Here In arrsplittext im getting array of strings that are splitted so for every iteration it will give one string... and compare range is for comparing range in mater file header but im not getting strings under header with match... please help guys
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

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