If cell is not empty then go to new line

rjeeva

New Member
Joined
Oct 13, 2015
Messages
7
HI,

I want call values from sheet1 to sheet2

but on sheet2 i have "Date, Description, amount" which i will enter manually

but if i enter anything on sheet1 "date description, amount" it should reflect on sheet2, but it should post it on next new line

Im trying this from last 2 days not able to figure it out.

Can anyone please help me?
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
With your copy macro (Sheet1 to Sheet2) you could detect the last used row of Sheet2 and then do the Paste.

To check all columns of used rows:

LastRow = Cells.Find("*", Cells(Rows.Count, Columns.Count), SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row

or to check one column specifically:

LastRow = Range("A" & Rows.Count).End(xlUp).Row
 
Upvote 0
Have a try with this code. It's just a try since you don't say how and when you need to copy the data from one sheet to the other.
Code:
Option Explicit

Sub test()
    
    Dim nextrow As Long
    Dim ShOrig As Worksheet
    Dim ShDest As Worksheet
    
    Set ShOrig = Sheets("Paid")
    Set ShDest = Sheets("Transactions")
    nextrow = ShDest.Cells(Rows.Count, "B").End(xlUp).Row + 1
    Application.ScreenUpdating = False
    ShDest.Select
    ShOrig.Range("A3").Copy
    ShDest.Range("B" & nextrow).Select
    Selection.PasteSpecial Paste:=xlPasteValues
    ShOrig.Range("B3").Copy
    ShDest.Range("D" & nextrow).Select
    Selection.PasteSpecial Paste:=xlPasteValues
    ShOrig.Range("C3").Copy
    ShDest.Range("E" & nextrow).Select
    Selection.PasteSpecial Paste:=xlPasteValues
    ShOrig.Range("D3").Copy
    ShDest.Range("C" & nextrow).Select
    Selection.PasteSpecial Paste:=xlPasteValues
    ShOrig.Select
    Application.CutCopyMode = False
    Application.ScreenUpdating = True

End Sub
 
Last edited:
Upvote 0
Thank you for the support...
i tried that but its not showing proper reult which i need . so i changed my requirement accordding to what i can do. in this way i will learn slowly about excel
 
Upvote 0

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top