+ Reply to Thread
Results 1 to 2 of 2

Columns not showing correctly

Hybrid View

  1. #1
    Registered User
    Join Date
    05-20-2008
    Posts
    20

    Columns not showing correctly

    I'm able to display the data I take out from db worksheet as rows correctly. But I'm unable to display it as columns correctly...what is wrong?

    Private Sub CommandButton1_Click()
    
    Dim intRow As Integer
    Dim custIDchosen As String
    
    intRow = 2
    
    Do While Worksheets("db").Cells(intRow, 2).Value <> ""
        If CStr(Worksheets("db").Cells(intRow, 1).Value) = Sheets("nvT").Range("b1").Value Then
            
            cusID = Worksheets("db").Cells(intRow, 5).Value
            cus = Worksheets("db").Cells(intRow, 4).Value
            Sheets("nvT").Range("a" & Rows.Count).End(xlUp)(2).Resize(, 2).Value = _
            Array(cusID, cus)
            
            proID = Worksheets("db").Cells(intRow, 7).Value
            pro = Worksheets("db").Cells(intRow, 8).Value
            Worksheets("Sheet1").Range("b1", Worksheets("Sheet1").Cells(1, Columns.Count).End(xlToLeft))(3).Value = _
            Array(proID)
        End If
        
        intRow = intRow + 1
     Loop
     
    
     
    End Sub
    Last edited by Pukka83; 05-21-2008 at 04:23 AM. Reason: Title Edit

  2. #2
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    Pukka83, please take a moment to look at the forum rules (rule 1) they will help you get the best from this forum and help others to help you.

    Please click on the edit button on your post then Go Advanced and change your title for something that better describes your problem - a good rule of thumb is to create a title that would match a kind of search in Google. e.g Rather than "Please Help Not Functioning" perhaps the title should be "Formula not producing required results", i know these aren't your titles or problems but it would give you a better idea.
    Not all forums are the same - seek and you shall find

+ Reply to Thread

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