+ Reply to Thread
Results 1 to 26 of 26

Finding a column in one sheet and pasting in another sheet- ones I found dont work

Hybrid View

  1. #1
    Registered User
    Join Date
    12-20-2013
    Location
    austin
    MS-Off Ver
    Excel 2010
    Posts
    18

    Exclamation Finding a column in one sheet and pasting in another sheet- ones I found dont work

    Hi Everyone,
    I hope to get a reply soon this is my first time on here although I have been here for a while, sorry.

    My goal is to find a column header name "Current" which could be ANYWHERE in a worksheet (worksheet name-- >"00-1820080") and paste it to another sheet (worksheet name ---> "Upload") on column I.
    I have the following formulas but they failed to solve my problem, they keep posting Column I from (worksheet name-- >"00-1820080") to Column I on (worksheet name ---> "Upload") ... I don't want that:

    'Look for "Current" copy and then Paste on Upload
    Dim i As Integer, j As Integer, LR As Long
    With Sheets("00-1820080")
        For i = 1 To 12
            If .Cells(1, i).Value Like "Current" Then
                LR = .Cells(Rows.Count, i).End(xlUp).Row
                j = j + 9
                .Range(.Cells(2, i), .Cells(LR, i)).Copy Destination:=Sheets("Upload").Cells(2, j)
            End If
        Next i
    End With

    AND I have tried this following formula as well .. bother don't work .. first one was working fine for a while and not it doesn't work :S

    Dim s1 As Worksheet, s2 As Worksheet
     Set s1 = Sheets("00-1820080")
     Set s2 = Sheets("Upload")
     s1.Activate
     Range("A1").Select
     s1.Rows("1:1").Find(What:="Current", After:=ActiveCell, LookIn:=xlFormulas, _
             LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
             MatchCase:=False, SearchFormat:=False).Activate
     c = ActiveCell.Column
     s1.Columns(c).Copy s2.Range("I1")
     End Sub
    Last edited by FDibbins; 06-04-2015 at 06:15 PM.

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Finding a column in one sheet and pasting in another sheet- ones I found dont work

    Maybe:

    Sub alirizvil()
    Dim x As Range
    Dim y As Long
    Dim ws As Worksheet, ws2 As Worksheet
    Set ws = Sheets("00-1820080")
    Set ws2 = Sheets("Upload")
    Set x = ws.Rows(1).Find("Current", LookIn:=xlValues, lookat:=xlWhole)
        If Not x Is Nothing Then
        y = ws.Cells(Rows.Count, x.column).End(3).row
            ws.Range(ws.Cells(2, x.column), ws.Cells(y, x.column)).Copy ws2.Range("I1")
        End If
    Set x = Nothing
    End Sub

  3. #3
    Registered User
    Join Date
    12-20-2013
    Location
    austin
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Finding a column in one sheet and pasting in another sheet- ones I found dont work

    Good Morning John,

    Thank you so much for your reply, I just tried the formula and it still doesn't seem to work... it seems to skip over that code.
    I can attach the file..
    the form tab has the button to run the macro. and that code is located in the "createupload" module it is located in the top after the "headings"
    ... well not im trying to attach the file and its not letting me attach it, keeps loading.

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Finding a column in one sheet and pasting in another sheet- ones I found dont work

    Can you attach a sample with some dummy data. To attach a file click on Go Advanced, scroll down to the Manage Attachments button, browse to the required file, and then push the Upload button then hit done.

  5. #5
    Registered User
    Join Date
    12-20-2013
    Location
    austin
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Finding a column in one sheet and pasting in another sheet- ones I found dont work

    I tried that and since then it is still "uploading" and nothing is being uploaded.

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Finding a column in one sheet and pasting in another sheet- ones I found dont work

    You don't have too upload your original file. The size may be too large. Just create a sample with a little data, enough to show what the problem is. Then we can take a look at it.

  7. #7
    Registered User
    Join Date
    12-20-2013
    Location
    austin
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Finding a column in one sheet and pasting in another sheet- ones I found dont work

    Trying a 600kb file now and its still "uploading"

  8. #8
    Registered User
    Join Date
    12-20-2013
    Location
    austin
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Finding a column in one sheet and pasting in another sheet- ones I found dont work

    Can anyone help?

  9. #9
    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
    52,946

    Re: Finding a column in one sheet and pasting in another sheet- ones I found dont work

    Reduce your sample workbook to just what you need to show what you have, and what you want. Remove anything that does not directly relate to your question, then try the upload again
    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

  10. #10
    Registered User
    Join Date
    12-20-2013
    Location
    austin
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Finding a column in one sheet and pasting in another sheet- ones I found dont work

    here is the code for newother_

    Sub newother_()
    'CREATED BY ALI RIZVI 03/12/2015
    
       'Create Sheet
      Sheets("00-1820080").Select
      Sheets.Add After:=Sheets(Sheets.Count)
      ActiveSheet.Name = "Upload2"
    
    'copy paste upload tab to upload2 tab
     Sheets("Upload").Select
        Rows("1:1").Select
        Range(Selection, Selection.End(xlDown)).Select
        Application.CutCopyMode = False
        Selection.Copy
        Sheets("Upload2").Select
        ActiveSheet.Paste
        
    'Putting (CREDIT)
        Sheets("Upload2").Select
        Columns("I:I").Select
        Selection.Copy
        Columns("J:J").Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
        Range("j1").Select
        ActiveCell.FormulaR1C1 = "CREDIT"
    
    'Change Numbers from negative to positive for Upload2 tab
        
    Sheets("Upload2").Select
    Dim Lastrow As Integer
    Lastrow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
    
    For Each Cell In Range("J2:J" & Lastrow)
    If Cell.Value < 0 Then
        Cell.Value = Abs(Cell.Value)
    End If
    Next Cell
    
    
     'Add PREPAIDS FEBRUARY (REFERAN)
    Sheets("Upload2").Select
    Finalrow = Cells(Rows.Count, "I").End(xlUp).Row
    Range("F2:F" & Finalrow).Formula = "=FORM!$B$4"
    Range("F2").Copy Destination:=Range("F2:F" & Finalrow)
    
     'Add 00-1820080 (GLACCTNUMB)
    Sheets("Upload2").Select
    Finalrow = Cells(Rows.Count, "I").End(xlUp).Row
    Range("G2:G" & Finalrow).Formula = "00-1820080"
    Range("G2").Copy Destination:=Range("G2:G" & Finalrow)
    
    'Add (ACCOUNTNAME)
    Sheets("Upload2").Select
    Finalrow = Cells(Rows.Count, "I").End(xlUp).Row
    Range("H2:H" & Finalrow).Formula = "=VLOOKUP(C[-1],ChartofAccounts!C[-7]:C[-6],2,0)"
    Range("H2").Copy Destination:=Range("H2:H" & Finalrow)
    
    'Putting (DEBIT)
    Finalrow = Cells(Rows.Count, "I").End(xlUp).Row
    Range("I2:I" & Finalrow).Formula = "0"
    Range("I2").Copy Destination:=Range("I2:I" & Finalrow)
    
    'Add "1" (JRNENTRY)
    Sheets("Upload").Select
    Range("D2").Select
    ActiveCell.FormulaR1C1 = "1"
    LR = Range("I" & Rows.Count).End(xlUp).Row
    Range("D2").AutoFill Destination:=Range("D2:D" & LR), Type:=xlFillSeries
    
    
     'Add PREPAIDS FEBRUARY (DISTRIBUTIONREF)
    Sheets("Upload2").Select
    Finalrow = Cells(Rows.Count, "I").End(xlUp).Row
    Range("M2:M" & Finalrow).Formula = "=FORM!$B$4"
    Range("M2").Copy Destination:=Range("M2:M" & Finalrow)
    
    'Move Upload2 info to Upload
    Sheets("Upload2").Select
            Rows("2:2").Select
            Range(Selection, Selection.End(xlDown)).Select
            Selection.Copy
            Sheets("Upload").Select
            ActiveSheet.Range("a1").End(xlDown).Offset(1, 0).Select
            ActiveSheet.Paste
    
    
    
    
    End Sub

  11. #11
    Registered User
    Join Date
    12-20-2013
    Location
    austin
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Finding a column in one sheet and pasting in another sheet- ones I found dont work

    So whats happening is that im trying to find a column with the heading "current" which could be anywhere on sheet 00-1820080 and paste it on column "I" on sheet "Upload"...
    instead of doing that the code picks up column I and posts to column on the other sheet.

  12. #12
    Registered User
    Join Date
    12-20-2013
    Location
    austin
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Finding a column in one sheet and pasting in another sheet- ones I found dont work

    I have done that over and over again to the point where my workbook was 600kb and it still didn't work.

    I can paste all my code below...
     Sub Upload()
    
    
    'Create Sheet
      Sheets("00-1820080").Select
      Sheets.Add After:=Sheets(Sheets.Count)
      ActiveSheet.Name = "Upload"
      
      
    'Headings on "Upload" tab
        Sheets("Upload").Select
        Range("A1").Select
        ActiveCell.FormulaR1C1 = "COMPANYID"
    
        Range("B1").Select
        ActiveCell.FormulaR1C1 = "COMPANY NAME"
    
        Range("C1").Select
        ActiveCell.FormulaR1C1 = "BACHNAME"
    
        Range("d1").Select
        ActiveCell.FormulaR1C1 = "JRNENTRY"
        
        Range("e1").Select
        ActiveCell.FormulaR1C1 = "TRXTYPE"
    
        Range("f1").Select
        ActiveCell.FormulaR1C1 = "REFERAN"
        
        Range("g1").Select
        ActiveCell.FormulaR1C1 = "GLACCTNUMB"
    
        Range("h1").Select
        ActiveCell.FormulaR1C1 = "ACCOUNTNAME"
        
        Range("i1").Select
        ActiveCell.FormulaR1C1 = "DEBIT"
        
        Range("j1").Select
        ActiveCell.FormulaR1C1 = "CREDIT"
        
        Range("k1").Select
        ActiveCell.FormulaR1C1 = "DATE"
    
        Range("l1").Select
        ActiveCell.FormulaR1C1 = "REVERSING DATE"
    
        Range("m1").Select
        ActiveCell.FormulaR1C1 = "DISTRIBUTIONREF"
        
        Range("n1").Select
        ActiveCell.FormulaR1C1 = "SQLNE"
        
        Range("o1").Select
        ActiveCell.FormulaR1C1 = "AA_AMOUNT"
        
        Range("p1").Select
        ActiveCell.FormulaR1C1 = "TRX_DIM"
        
        Range("q1").Select
        ActiveCell.FormulaR1C1 = "TRX_DIM_CODE"
    
        Range("r1").Select
        ActiveCell.FormulaR1C1 = "SUB_LOOKUP_ID"
        
        Range("s1").Select
        ActiveCell.FormulaR1C1 = "RDEBIT"
        
        Range("t1").Select
        ActiveCell.FormulaR1C1 = "RCREDIT"
        
    'copy/paste numbers from recon to upload
    Sheets("00-1820080").Select
    ActiveSheet.Range("$A$1:$X$138").AutoFilter Field:=1, Criteria1:="CR"
    
    '----------------------------------------------------------------------------------------TROUBLE IS WITH THE CODE BELOW IMMEDIATELY BELOW THIS LINE
    'Look for "Current" copy and then Paste on Upload
    Dim i As Integer, j As Integer, LR As Long
    With Sheets("00-1820080")
        For i = 1 To 12
            If .Cells(1, i).Value Like "Current" Then
                LR = .Cells(Rows.Count, i).End(xlUp).Row
                j = j + 9
                .Range(.Cells(2, i), .Cells(LR, i)).Copy Destination:=Sheets("Upload").Cells(2, j)
            End If
        Next i
    End With
    
    Sheets("00-1820080").Select
    ActiveSheet.ShowAllData
    
    'Take out CR to have the vendor names pasted on upload (REFERAN)
    Sheets("00-1820080").Select
    ActiveSheet.Range("$A$13:$T$763").AutoFilter Field:=1, _
            Criteria1:="<>CR", _
            Operator:=xlAnd
    Range("A2:A" & Cells(Rows.Count, "A").End(xlUp).Row).SpecialCells(xlCellTypeVisible).Copy _
    Sheets("Upload").Range("F2")
    
    'Change Numbers from negative to positive for Upload tab
        
    Sheets("Upload").Select
    Dim Lastrow As Integer
    Lastrow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
    
    For Each Cell In Range("I2:I" & Lastrow)
    If Cell.Value < 0 Then
        Cell.Value = Abs(Cell.Value)
    End If
    Next Cell
    
    'Add ATECH (COMPANYID)
    Finalrow = Cells(Rows.Count, "I").End(xlUp).Row
    Range("A2:A" & Finalrow).Formula = "=FORM!$B$2"
    Range("A2").Copy Destination:=Range("A2:A" & Finalrow)
        
    'Add Amherst InsightLabs LLC (COMPANY NAME)
    Finalrow = Cells(Rows.Count, "I").End(xlUp).Row
    Range("B2:B" & Finalrow).Formula = "Amherst InsightLabs LLC"
    Range("B2").Copy Destination:=Range("B2:B" & Finalrow)
    
    'Add PREPAIDS (BACHNAME)
    Finalrow = Cells(Rows.Count, "I").End(xlUp).Row
    Range("C2:C" & Finalrow).Formula = "=FORM!$B$7"
    Range("C2").Copy Destination:=Range("C2:C" & Finalrow)
        
    'Add "1" (JRNENTRY)
    Sheets("Upload").Select
    Range("D2").Select
    ActiveCell.FormulaR1C1 = "1"
    LR = Range("I" & Rows.Count).End(xlUp).Row
    Range("D2").AutoFill Destination:=Range("D2:D" & LR), Type:=xlFillSeries
        
    'Add "0" (TRXTYPE)
    Finalrow = Cells(Rows.Count, "I").End(xlUp).Row
    Range("E2:E" & Finalrow).Formula = "=FORM!$B$5"
    Range("E2").Copy Destination:=Range("E2:E" & Finalrow)
        
    'Add (GLACCTNUMB)
     Sheets("00-1820080").Select
    ActiveSheet.ShowAllData
    
    'Take out CR to have the GL Account number pasted on upload
    Sheets("00-1820080").Select
    ActiveSheet.Range("$A$13:$T$763").AutoFilter Field:=1, _
            Criteria1:="<>CR", _
            Operator:=xlAnd
    Range("C2:C" & Cells(Rows.Count, "A").End(xlUp).Row).SpecialCells(xlCellTypeVisible).Copy _
    Sheets("Upload").Range("G2")
        
        
    'Add (ACCOUNTNAME)
    Sheets("Upload").Select
    Finalrow = Cells(Rows.Count, "I").End(xlUp).Row
    Range("H2:H" & Finalrow).Formula = "=VLOOKUP(C[-1],ChartofAccounts!C[-7]:C[-6],2,0)"
    Range("H2").Copy Destination:=Range("H2:H" & Finalrow)
    
    
    'Add (CREDIT)
    Finalrow = Cells(Rows.Count, "I").End(xlUp).Row
    Range("J2:J" & Finalrow).Formula = "0"
    Range("J2").Copy Destination:=Range("J2:J" & Finalrow)
    
    'Add (DATE)
    Finalrow = Cells(Rows.Count, "I").End(xlUp).Row
    Range("K2:K" & Finalrow).Formula = "=FORM!$B$3"
    Range("K2").Copy Destination:=Range("K2:K" & Finalrow)
    
    
    'Take out CR to have the vendor names pasted on upload (REFERAN)
    Sheets("00-1820080").Select
    ActiveSheet.ShowAllData
    
    Sheets("00-1820080").Select
    ActiveSheet.Range("$A$13:$T$763").AutoFilter Field:=1, _
            Criteria1:="<>CR", _
            Operator:=xlAnd
    Range("A2:A" & Cells(Rows.Count, "A").End(xlUp).Row).SpecialCells(xlCellTypeVisible).Copy _
    Sheets("Upload").Range("M2")
    
    '(SQLNE) Fill Series Numbers 1,2,3,4,5...
    Sheets("Upload").Select
    Range("N2").Select
    ActiveCell.FormulaR1C1 = "1"
    LR = Range("I" & Rows.Count).End(xlUp).Row
    Range("N2").AutoFill Destination:=Range("N2:N" & LR), Type:=xlFillSeries
    
    
    '(RDEBIT) AND (RCREDIT) Column S
    Dim LS As Long
    Range("S2").Select
    ActiveCell.FormulaR1C1 = "=ROUND(RC[-10],2)"
    LR = Range("I" & Rows.Count).End(xlUp).Row
    Range("S2").AutoFill Destination:=Range("S2:S" & LR), Type:=xlFillSeries
    
    Dim LT As Long
    Range("t2").Select
    ActiveCell.FormulaR1C1 = "=ROUND(RC[-10],2)"
    LR = Range("I" & Rows.Count).End(xlUp).Row
    Range("t2").AutoFill Destination:=Range("t2:t" & LR), Type:=xlFillSeries
    
    
    'Combine
    Call newother_
    
    'Negative to POSITIVE
    Sheets("Upload").Select
    Dim Lastrow1 As Integer
    Lastrow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
    
    For Each Cell In Range("I2:I" & Lastrow)
    If Cell.Value < 0 Then
        Cell.Value = Abs(Cell.Value)
    End If
    Next Cell
    
    '(SQLNE) Fill Series Numbers 1,2,3,4,5...
    Sheets("Upload").Select
    Range("N2").Select
    ActiveCell.FormulaR1C1 = "1"
    LR = Range("I" & Rows.Count).End(xlUp).Row
    Range("N2").AutoFill Destination:=Range("N2:N" & LR), Type:=xlFillSeries
    
    'FOrmatting Upload tab
        Cells.Select
        Cells.EntireColumn.AutoFit
        Columns("H:H").Select
        Selection.Copy
        Columns("F:F").Select
        Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
            SkipBlanks:=False, Transpose:=False
        Application.CutCopyMode = False
        Selection.Copy
        Columns("M:M").Select
        Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
            SkipBlanks:=False, Transpose:=False
        Application.CutCopyMode = False
        
    ' (BACHNAME)
    
    Finalrow = Cells(Rows.Count, "I").End(xlUp).Row
    Range("A2:A" & Finalrow).Formula = "=FORM!$B$2"
    Range("A2").Copy Destination:=Range("A2:A" & Finalrow)
    
    'DELETE UPLOAD2
    Application.DisplayAlerts = False
    
    Sheets("Upload2").Select
    
    ActiveWindow.SelectedSheets.Delete
    
    Application.DisplayAlerts = True
    
    
    
    
    End Sub
    Last edited by FDibbins; 06-04-2015 at 06:14 PM.

  13. #13
    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
    52,946

    Re: Finding a column in one sheet and pasting in another sheet- ones I found dont work

    You need to use code tags when posting code, see point 1 of my signature.

    I will add them for you - this time

    edit: OK, I see that you did try to use code tags, you didnt close them

  14. #14
    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
    52,946

    Re: Finding a column in one sheet and pasting in another sheet- ones I found dont work

    The / goes before the CODE, not after

  15. #15
    Registered User
    Join Date
    12-20-2013
    Location
    austin
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Finding a column in one sheet and pasting in another sheet- ones I found dont work

    Oh I see! Ill be keen to do that next time...

  16. #16
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Finding a column in one sheet and pasting in another sheet- ones I found dont work

    Hi Ali,

    Try John's program with this adjustment:

    Sub alirizvil() 'John H. Davis
    Dim x As Range
    Dim y As Long
    Dim ws As Worksheet, ws2 As Worksheet
    Set ws = Sheets("00-1820080")
    Set ws2 = Sheets("Upload")
    Set x = ws.Rows(1).Find("Current", LookIn:=xlValues, lookat:=xlWhole, MatchCase:=xlFalse)
        If Not x Is Nothing Then
        y = ws.Cells(Rows.Count, x.column).End(3).row
            ws.Range(ws.Cells(2, x.column), ws.Cells(y, x.column)).copy ws2.Range("I1")
        End If
    Set x = Nothing
    End Sub
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  17. #17
    Registered User
    Join Date
    12-20-2013
    Location
    austin
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Finding a column in one sheet and pasting in another sheet- ones I found dont work

    I will definitely try and let you know, just left work... thank you so much!

  18. #18
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Finding a column in one sheet and pasting in another sheet- ones I found dont work

    You're welcome - hope it works

  19. #19
    Registered User
    Join Date
    12-20-2013
    Location
    austin
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Finding a column in one sheet and pasting in another sheet- ones I found dont work

    That didn't work either, the whole formula was ignored. so weird! I mean this isn't the most technical thing. I wish I could email the file since its not uploading.

  20. #20
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Finding a column in one sheet and pasting in another sheet- ones I found dont work

    Hi Ali,

    Try this - it will search the first 5 rows:

    Sub alirizvilX() 'John H. Davis
    Dim x As Range
    Dim y As Long
    Dim ws As Worksheet, ws2 As Worksheet
    Set ws = Sheets("00-1820080")
    Set ws2 = Sheets("Upload")
    Set x = ws.Rows("1:5").Find("Current", LookIn:=xlValues, lookat:=xlPart, MatchCase:=xlNo)
        If Not x Is Nothing Then
        y = ws.Cells(Rows.Count, x.column).End(3).row
            ws.Range(ws.Cells(2, x.column), ws.Cells(y, x.column)).copy ws2.Range("I1")
        End If
    Set x = Nothing
    End Sub

  21. #21
    Registered User
    Join Date
    12-20-2013
    Location
    austin
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Finding a column in one sheet and pasting in another sheet- ones I found dont work

    It works! :D
    Thank you so so so much!
    Been trying to figure this our for several days now!
    I appreciate the help from you guys!

  22. #22
    Registered User
    Join Date
    12-20-2013
    Location
    austin
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Finding a column in one sheet and pasting in another sheet- ones I found dont work

    sorry It sent the same message twice.. what did you mean by "trailing spaces"?

  23. #23
    Registered User
    Join Date
    12-20-2013
    Location
    austin
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Finding a column in one sheet and pasting in another sheet- ones I found dont work

    It works! :D
    Thank you so so so much!
    Been trying to figure this our for several days now!
    I appreciate the help from you guys!

  24. #24
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Finding a column in one sheet and pasting in another sheet- ones I found dont work

    Hi Ali,

    Instead of the header reading "Current" it probably reads "Current " and as such wouldn't be seen as a match.

  25. #25
    Registered User
    Join Date
    12-20-2013
    Location
    austin
    MS-Off Ver
    Excel 2010
    Posts
    18
    Quote Originally Posted by xladept View Post
    Hi Ali,

    Instead of the header reading "Current" it probably reads "Current " and as such wouldn't be seen as a match.
    Oh, I see! That could very well be it! Thanks so much!

  26. #26
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Finding a column in one sheet and pasting in another sheet- ones I found dont work

    You're welcome and thanks for the rep!

    *Your header probably had trailing space(s).

+ 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] Copy row from one sheet and paste to another if a key word is found in 1 column of sheet 1
    By killdozer in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 04-17-2014, 02:27 PM
  2. Macro for finding cell value and pasting entire column in new sheet
    By rexer231 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-15-2013, 07:20 AM
  3. Replies: 16
    Last Post: 01-20-2013, 09:40 AM
  4. VBA Codes dont work when sheet is protected
    By SARC777 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 08-18-2010, 10:32 AM
  5. [SOLVED] when I protect my sheet enter tab, & arrow keys dont work...
    By greg in forum Excel General
    Replies: 0
    Last Post: 05-25-2005, 11:06 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