Hi All,
My name is Tim and I am a total newbie at excel so I am sorry if my question sounds dumb. I normally repair PC's and Laptops but am trying to help a friend with his invoicing and have found I am enjoying working with excel to the point where I am now stuck !
I have made an invoice, managed to work out how to do lists so he can alter his VAT etc and I wanted to progress further by having a couple of buttons that he could press to:- 1. Add a new customer to his database and 2. Recall an existing customer so that he didnt have to enter customer details if they were already in the database.
Sooooo.
I'm not worried about part 2 just yet as it's well beyond me at the moment but I am so close to getting part 1 working - I just need a little help with adding the customer data to the next row in the database sheet !
Basically, sheet 1 is the invoice, sheet 2 is the list sheet for VAT, and sheet 3 will be the database. I set up a button on sheet 1 that calls a macro to copy each individual cell with customer data into a SPECIFIC cell in sheet 3 - I was really pleased with myself when it worked - I even managed to google and find out how to disable the screen from updating so that it didn't "flash" during the copy and was a lot faster !
Buuuut, I am now stuck ! I can see that I need a command like Dim lastrow=xxx and I tried various lastrow finding macros but for the life of me I cant workout how to modify my copying macro to work with the lastrow Dim.
Here's a portion of the macro I use to copy from invoice sheet to database sheet - Again, I apologise if it looks daft but it works (allbeit for one set row!) and I have no knowledge of excel to speak of. I repeat the same code changing the destination field to B4, C4, D4 etc (4 is the last row at moment and is the bit I need to be automated)
' Customer Surname Name
Range("F14").Select
Selection.Copy
Sheets("Lookup Table").Select
Range("C4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Invoice").Select
' Customer Address
Range("D15").Select
Selection.Copy
Sheets("Lookup Table").Select
Range("D4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Invoice").Select
If someone could point me in the right direction I'd be grateful - half the problem I am having is that I don't know the technical terms used in excel so it's hard to put into google what I want to do to get a result back.
Kind Regards,
Tim.
My name is Tim and I am a total newbie at excel so I am sorry if my question sounds dumb. I normally repair PC's and Laptops but am trying to help a friend with his invoicing and have found I am enjoying working with excel to the point where I am now stuck !
I have made an invoice, managed to work out how to do lists so he can alter his VAT etc and I wanted to progress further by having a couple of buttons that he could press to:- 1. Add a new customer to his database and 2. Recall an existing customer so that he didnt have to enter customer details if they were already in the database.
Sooooo.
I'm not worried about part 2 just yet as it's well beyond me at the moment but I am so close to getting part 1 working - I just need a little help with adding the customer data to the next row in the database sheet !
Basically, sheet 1 is the invoice, sheet 2 is the list sheet for VAT, and sheet 3 will be the database. I set up a button on sheet 1 that calls a macro to copy each individual cell with customer data into a SPECIFIC cell in sheet 3 - I was really pleased with myself when it worked - I even managed to google and find out how to disable the screen from updating so that it didn't "flash" during the copy and was a lot faster !
Buuuut, I am now stuck ! I can see that I need a command like Dim lastrow=xxx and I tried various lastrow finding macros but for the life of me I cant workout how to modify my copying macro to work with the lastrow Dim.
Here's a portion of the macro I use to copy from invoice sheet to database sheet - Again, I apologise if it looks daft but it works (allbeit for one set row!) and I have no knowledge of excel to speak of. I repeat the same code changing the destination field to B4, C4, D4 etc (4 is the last row at moment and is the bit I need to be automated)
' Customer Surname Name
Range("F14").Select
Selection.Copy
Sheets("Lookup Table").Select
Range("C4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Invoice").Select
' Customer Address
Range("D15").Select
Selection.Copy
Sheets("Lookup Table").Select
Range("D4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Invoice").Select
If someone could point me in the right direction I'd be grateful - half the problem I am having is that I don't know the technical terms used in excel so it's hard to put into google what I want to do to get a result back.
Kind Regards,
Tim.