Dear All expert
i have the following code that work good but what i need to copy value in range without empty row
here the code
HTML Code:
Dear All expert
i have the following code that work good but what i need to copy value in range without empty row
here the code
HTML Code:
Maybe:
Please Login or Register to view this content.
If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)
You can't do one thing. XLAdept
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin
Add this after your pastespecial line to get rid of the blank rows.
This will delete the empty rows from your print sheet.Please Login or Register to view this content.
Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
Just when I think I am smart, I learn something new!
Dear JLGWhiz
please its give me error as in attached photo
Dear xladept
Please see my attached photo because its not working
It was missing a Parenthesis.
Please Login or Register to view this content.
Dear JLGWhiz
Still not working give me the following error
Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.
Remember to desensitize the data.
Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
Last edited by JLGWhiz; 03-24-2018 at 05:19 PM.
please kindly find my attached file
the problem is i use userfrom to enter data in Label Sheet in all yellow cells
and my formula in rest of cell generate data
what i need copy data from label sheet to Print sheet without any change in label sheet
and the data copied in print sheet without any empty row or make one row as seprator between
every group
like in my file
because the code for JLGWhiz is change in Label and remove rows that have function
Try this:
Please Login or Register to view this content.
Last edited by xladept; 03-24-2018 at 10:18 PM. Reason: Compactness
The reason it was deleting rows in the 'Label' sheet was because the Rows(i) needed a period in front of it to tie it to the 'Print' sheet. It defaulted to the active sheet without that period. That is also what was causing the error before. With the period in place it should copy your rows to the Print sheet and then delete the empty rows. If the code from xladept does not work for you, you can try the above modified snippet.Please Login or Register to view this content.
Last edited by JLGWhiz; 03-24-2018 at 09:27 PM.
the code doesn't work its give me error
as in photo
the target from my file as the following
i have 8 cases in column J in label sheet
and in D2 date according to this date they get corresponding data from ref sheet in range of
D:J
meaning it will generate data according to date
if we select case suppose FFFSE , FFFRO ,FFFLYRO only it make 5 row is empty
but i need to get this data withouyt this empty row
if there is any one have another idea to make all this job with easier way i will appreciate
many thanks for all for attention and concern
What does the error say? This code ran on your sample
yes on my last file i post 11
sorry it work i make new one and try it and it work good
but please if i need to add to this code something before add value to print sheet delete previous data in print sheet because
if i create new data entry i found in the same file previous data
If the error is because of your msgbox "not filled in" then you can just run this separately:
Please Login or Register to view this content.
how can i add the following to the code
before copy data from Label sheetHTML Code:
also if can make this code make only one row empty between each case or not as separator ( if can)
Try this:
Please Login or Register to view this content.
what about clear code
Try this:
And thanks for the rep!Please Login or Register to view this content.
its not working good for clearance
What's not working??
clearance print sheet before adding data
That's what it's supposed to do by post #21???
the problem if i make data generation and come again to make another data it not remove previous data in print sheet
for this reason i want to add to my code line that before copy data from label sheet to print its make clearance for print sheet then copy data to it from label sheet
But isn't that exactly what the routine does?
Did you make the correction as noted in post #13? The anomally you noted in post #11 of deleting formulas on sheet Label will be fixed by simply putting a period in front of the Rows(1) in the code snippet. Then use the snippet after the pastespecial line of code.
Dear JLGWhiz
I'm So sorry because I'm not understand you exactly what you mean because my knowledge is very weak in VBA code
please see my attached photo with example
Last edited by mazan2010; 03-26-2018 at 04:14 PM.
what about how can make the code delete previous data in print sheet before add new data
Dear
do you can see my attached file with all code that i try to add your code with clear but not working
and add button on userform to clear file then use another button to generate data then use another to export data
that what i need this button for generate and clear be
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks