Related:
- Excel help?
- Excel marksheet - Guide
- Number to words in excel - Guide
- Excel apk for pc - Download - Spreadsheets
- Kernel for excel - Download - Backup and recovery
- Gif in excel - Guide
3 responses
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Dec 14, 2011 at 10:20 AM
Dec 14, 2011 at 10:20 AM
Could you upload a sample file at some shared site with you marco and post back the link here, it would be easy to tell you what needs to be changed
Hi
Thanks for your quick reply.
I have tried to take a video of my screen to show you how I am recording the macro but the software I have downloaded (Camstudio) is not working!! I hate having to use Windows as my Mac works perfectly!!
Perhaps I can explain what I have done more clearly.
I have selected the items I want to display on the invoice by selecting just one bidder from the pivot table.
This then shows the lot number of each item won by that bidder and their descriptions, sale prices etc from the various columns of the main spreadsheet. I then want to transfer this data to the invoice by pressing a button not by cutting and pasting etc.
I have already successfully used VLOOKUP on the Invoice page to display all of the required fields (description, sale price, commission, total price etc..) by referring each time to the unique Lot number.
As long as a lot number is pasted or typed into the first column of the invoice page, all other details are displayed correctly = fantastic!
All I want to do is be able to copy and then paste the lot numbers of items won by the bidder into that first column and do so by pressing a macro button, not by cutting and pasting every time.
The macro I have recorded to do this is as follows:
1. Start recording
2. Highlight the first 21 rows of just the first column A which are the lot numbers
3. Right click and hit copy
4. Move to the Invoice Tab
5. Select the 21 rows of the first column of the Invoice sheet.
6. Right click and hit paste
7. Stop recording
I have assigned a button for this macro and when used it opens the Invoice page and those Lot numbers that have been pasted in the first column have all their respective details displayed in the correct columns = fantastic!
However, when selecting a different bidder from the pivot table in order to produce an invoice for them, they may have won 3 or 4 items that were originally listed on rows 71-74 of the original Auction worksheet. Now they have only to be invoiced for 3 or 4 items so now problem fitting this info onto the invoice template (21 rows available) but when I use the macro the lot numbers are not pasted across. This is because the paste function I have recorded selects only rows 1-21 and not 71-74 as needed in this case.
I appreciate that this may be a complete 'Heath Robinson' way of doing this function but it is almost working and I have no knowledge of VBA writing to come up with something better.
Ideally this paste function needs to select all items currently displayed in the first column (regardless of what row they appear on in the spreadsheet) and when the button is pressed paste them into the first column of the Invoice sheet so that VLOOKUP continues to work.
Therefore the paste function might read (select (up to a maximum of 21) all items currently displayed in Column A and paste into Column A of Invoice worksheet).
Any clearer?
Thanks in advance
Andy
Andy
Thanks for your quick reply.
I have tried to take a video of my screen to show you how I am recording the macro but the software I have downloaded (Camstudio) is not working!! I hate having to use Windows as my Mac works perfectly!!
Perhaps I can explain what I have done more clearly.
I have selected the items I want to display on the invoice by selecting just one bidder from the pivot table.
This then shows the lot number of each item won by that bidder and their descriptions, sale prices etc from the various columns of the main spreadsheet. I then want to transfer this data to the invoice by pressing a button not by cutting and pasting etc.
I have already successfully used VLOOKUP on the Invoice page to display all of the required fields (description, sale price, commission, total price etc..) by referring each time to the unique Lot number.
As long as a lot number is pasted or typed into the first column of the invoice page, all other details are displayed correctly = fantastic!
All I want to do is be able to copy and then paste the lot numbers of items won by the bidder into that first column and do so by pressing a macro button, not by cutting and pasting every time.
The macro I have recorded to do this is as follows:
1. Start recording
2. Highlight the first 21 rows of just the first column A which are the lot numbers
3. Right click and hit copy
4. Move to the Invoice Tab
5. Select the 21 rows of the first column of the Invoice sheet.
6. Right click and hit paste
7. Stop recording
I have assigned a button for this macro and when used it opens the Invoice page and those Lot numbers that have been pasted in the first column have all their respective details displayed in the correct columns = fantastic!
However, when selecting a different bidder from the pivot table in order to produce an invoice for them, they may have won 3 or 4 items that were originally listed on rows 71-74 of the original Auction worksheet. Now they have only to be invoiced for 3 or 4 items so now problem fitting this info onto the invoice template (21 rows available) but when I use the macro the lot numbers are not pasted across. This is because the paste function I have recorded selects only rows 1-21 and not 71-74 as needed in this case.
I appreciate that this may be a complete 'Heath Robinson' way of doing this function but it is almost working and I have no knowledge of VBA writing to come up with something better.
Ideally this paste function needs to select all items currently displayed in the first column (regardless of what row they appear on in the spreadsheet) and when the button is pressed paste them into the first column of the Invoice sheet so that VLOOKUP continues to work.
Therefore the paste function might read (select (up to a maximum of 21) all items currently displayed in Column A and paste into Column A of Invoice worksheet).
Any clearer?
Thanks in advance
Andy
Andy
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Dec 14, 2011 at 06:18 PM
Dec 14, 2011 at 06:18 PM
From what I can gather, your issue is seems to be in finding out how many rows you have to copy. Since I dont know layout of your sheets, I might be wrong, but I think all you have to do is insert the contents to other sheet without selecting the offsetting rows.
There are various ways to know how may rows to copy, but again, I have to see how your data is spread. You dont have to use Camstudio. You can upload a sample excel file with marco at some public file sharing site. And then post back the link to that file back here.
There are various ways to know how may rows to copy, but again, I have to see how your data is spread. You dont have to use Camstudio. You can upload a sample excel file with marco at some public file sharing site. And then post back the link to that file back here.
Hi,
Not sure if this will help in your case or not, but I have a library of Excel Spreadsheets you can download free. If your particular case is not covered, let me know and I will add it.
The site address is
Not sure if this will help in your case or not, but I have a library of Excel Spreadsheets you can download free. If your particular case is not covered, let me know and I will add it.
The site address is
' target='_blank' rel='nofollow'>http://www.workingdata.co.uk/spreadsheet_tips.php</code>
HTH,
Franc.