Results 1 to 8 of 8

cut & paste cells to new destination not working right

Threaded View

  1. #1
    Registered User
    Join Date
    07-08-2017
    Location
    Oregon, USA
    MS-Off Ver
    2010
    Posts
    13

    cut & paste cells to new destination not working right

    Forgive me if this code looks wonky. I pieced it together knowing very little about coding. What I want it to do is cut all cells with a value greater than 300 from cell range "B2:B71", and then paste those cells into column "I". It pastes them over, but is failing to paste the first cell that meets the value requirement. I think this may be because I have a header in I1. Help?

    Dim sourceRng As Range
    Dim cell As Range
    Dim i As Long
    Set sourceRng = ActiveSheet.Range("B2:B71")
    i = 1
    For Each cell In sourceRng
    If cell.Value > 300 Then
    cell.Resize(1, 2).Cut Destination:=Range("I" & i)
    i = i + 1

    TIA
    Last edited by Veroshima; 09-02-2017 at 07:34 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Copy from static destination & paste to dynamic destination
    By Marbleking in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-31-2015, 09:31 AM
  2. Copy and Paste w/ Paste Destination determined by Cell Value
    By jeremy9er7 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-10-2014, 10:42 AM
  3. [SOLVED] Help with code to paste copied data into a destination workbook
    By Grizz in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-26-2014, 06:27 AM
  4. [SOLVED] paste source filepath information to destination book (code included)
    By macrorookie in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-24-2014, 03:15 PM
  5. [SOLVED] Paste in "match destination format" macro code
    By Hopelesslylost in forum Excel General
    Replies: 6
    Last Post: 12-05-2012, 01:57 PM
  6. Code not working exactly, copy and paste issue
    By jpthelpguy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-22-2009, 01:42 PM
  7. Using destination filepaths listed in cell contents opposing to coding destination
    By kuraitori in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-22-2009, 01:23 PM

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