- My Forums
- Tiger Rant
- LSU Recruiting
- SEC Rant
- Saints Talk
- Pelicans Talk
- More Sports Board
- Fantasy Sports
- Golf Board
- Soccer Board
- O-T Lounge
- Tech Board
- Home/Garden Board
- Outdoor Board
- Health/Fitness Board
- Movie/TV Board
- Book Board
- Music Board
- Political Talk
- Money Talk
- Fark Board
- Gaming Board
- Travel Board
- Food/Drink Board
- Ticket Exchange
- TD Help Board
Customize My Forums- View All Forums
- Show Left Links
- Topic Sort Options
- Trending Topics
- Recent Topics
- Active Topics
Started By
Message
Excel Macro Help
Posted on 5/29/19 at 1:43 pm
Posted on 5/29/19 at 1:43 pm
I'm working on a spreadsheet and I found a macro that copies current day information from and output page ("Data Copy") to the last empty row of a log page ("Historical Data"). This is working well, but I just realized it is copying the info into the log sheet as a reference (not plain text). So everytime I try to enter a new days data the log sheet is changed. What do i need to add to this code to have it copy as plain text to the log page (not the cell reference like it is doing now)?
Thanks!
Thanks!
quote:
Sub CopyRow() Dim lastrowSrc As Long Dim lastrowDest As Long 'Get last row of data lastrowSrc = Sheets("Data Copy").Range("A" & Rows.Count).End(xlUp).Row 'Get first blank row (last row of data +1) lastrowDest = Sheets("Historical Data").Range("A" & Rows.Count).End(xlUp).Row + 1 'Copy row Sheets("Data Copy").Range("A" & lastrowSrc).EntireRow.Copy Sheets("Historical Data").Range("A" & lastrowDest) End Sub
Posted on 5/29/19 at 2:42 pm to KingofZydeco
Instead of the copy, try this:
Sheets("Historical Data").Range("A" & lastrowDest).Value = Sheets("Data Copy").Range("A" & lastrowSrc).Value
Sheets("Historical Data").Range("A" & lastrowDest).Value = Sheets("Data Copy").Range("A" & lastrowSrc).Value
Posted on 5/29/19 at 5:15 pm to Brisketeer
Thanks.... I got it to work!
Popular
Back to top
Follow TigerDroppings for LSU Football News