Results 1 to 26 of 26

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

Threaded 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.

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