1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Copy, Paste, Repeat macro in Excel

Discussion in 'Business Applications' started by llsinc, Nov 17, 2011.

Thread Status:
Not open for further replies.
  1. llsinc

    llsinc Thread Starter

    Joined:
    Nov 17, 2011
    Messages:
    1
    Referencing cells: I have a spreadsheet with sales tax in D1, net amount in D2 and the total in C3 and the name in B3. What I am trying to do is copy and paste the contents of C3 to C1 & C2 and repeat for contents of C6 to C4 & C5 and so on until all rows are processed
     
  2. bomb #21

    bomb #21

    Joined:
    Jul 1, 2005
    Messages:
    8,546
    Sub test()
    For Each Cell In Range("C1:C" & Range("C" & Rows.Count).End(xlUp).Row)
    If Cell = "" Then
    Cell.Value = Range("C" & Cell.End(xlDown).Row)
    End If
    Next Cell
    End Sub
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1027283

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice