+ Reply to Thread
Results 1 to 5 of 5

Need to paste info without formula , just figures itself but with my current code cant.

  1. #1
    Registered User
    Join Date
    02-18-2015
    Location
    Uk
    MS-Off Ver
    MS OFFICE 2010
    Posts
    2

    Need to paste info without formula , just figures itself but with my current code cant.

    Sub copyRow()
    Dim ws As Worksheet
    Dim lRow As Long

    ' define which worksheet to work on, i.e. replace Sheet1 with the name of your sheet
    Set ws = ActiveWorkbook.Sheets("total")

    ' determine the last row with content in column A and add one
    lRow = ws.Cells(Rows.Count, "C").End(xlUp).Row + 1

    ' copy the other cells into their ranges
    ws.Range("C7").Copy ws.Range("C" & lRow)
    ws.Range("d7").Copy ws.Range("D" & lRow)
    ws.Range("e7").Copy ws.Range("E" & lRow)
    ws.Range("f7").Copy ws.Range("F" & lRow)
    ws.Range("G7").Copy ws.Range("G" & lRow)
    ws.Range("H7").Copy ws.Range("H" & lRow)
    ws.Range("J7").Copy ws.Range("J" & lRow)
    ws.Range("K7").Copy ws.Range("K" & lRow)
    ws.Range("L7").Copy ws.Range("L" & lRow)
    ws.Range("M7").Copy ws.Range("M" & lRow)
    ws.[A1].Select
    End Sub

    With Current code it's just copying cells with formula , and i don't know how to copy it as a figures without formula, can someone help me sort it out ?

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Need to paste info without formula , just figures itself but with my current code cant

    please use
    Please Login or Register  to view this content.
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Need to paste info without formula , just figures itself but with my current code cant

    You don't need to use the copy method to put values in cells.

    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  4. #4
    Registered User
    Join Date
    02-18-2015
    Location
    Uk
    MS-Off Ver
    MS OFFICE 2010
    Posts
    2

    Re: Need to paste info without formula , just figures itself but with my current code cant

    It is working but every single time i'm runing macros it's puting values in a same row not a row below , what shoud i add , to paste it every single time on a row below ? Cheers

  5. #5
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Need to paste info without formula , just figures itself but with my current code cant

    I'm a little concerned. The comment says column A, the code setting lRow says column C, the pasting statements don't paste to column A. (thus, if the comment is correct and you are actually looking in column A, pasting won't advance the row)

    Please Login or Register  to view this content.

    Perhaps this, which uses column C to determine the last row of data.

    Please Login or Register  to view this content.
    Is there something in cell C7 or might it be blank?
    Last edited by mikerickson; 02-19-2015 at 10:11 AM.

+ 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. Replies: 2
    Last Post: 02-10-2014, 11:52 AM
  2. [SOLVED] Changing Current Code from Paste Formulas to Paste Values
    By freybe06 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-24-2013, 12:33 PM
  3. Code to paste info on next available line not working
    By matrixpom in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-22-2012, 04:07 AM
  4. Need a bit of code to allow only VB to cut and paste info
    By todmac in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-12-2011, 02:36 PM
  5. Formula or UDF to add figures by code #
    By mikeburg in forum Excel General
    Replies: 5
    Last Post: 09-15-2005, 12:05 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