VBA Code to cut an entire row(range a-bj)with the criteria of cells containing the word "adjustment deleted" and "reversal adjustment" in column c to another sheet named Deleted adjs. The number of rows differs everyday.
VBA Code to cut an entire row(range a-bj)with the criteria of cells containing the word "adjustment deleted" and "reversal adjustment" in column c to another sheet named Deleted adjs. The number of rows differs everyday.
Do you want the cut paste to happen on the click of a button or on the selection from a dropdown?
If I have helped, Don't forget to add to my reputation (click on the star below the post)
Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
Use code tags when posting your VBA code: [code] Your code here [/code]
from a click button
Try this code
Copy the Excel VBA code![]()
Please Login or Register to view this content.
Select the workbook in which you want to store the Excel VBA code
Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
Choose Insert | Module
Where the cursor is flashing, choose Edit | Paste
To run the Excel VBA code:
Choose Tools | Macro | Macros
Select a macro in the list, and click the Run button
You can also assign the code to a button and run it.
what if there were no deleted adjustments for the day?
Then it will check for reversal adjustment. If nothing there too, it will not show any data.
i tried inputting reversal adjustments in one of the cells but it still doesn't work
Check the spelling in the code v/s the spelling in your file and if both match, it should work.
Oh. I thing it's copy-pasting for cells that are tagged "reversal adjustments" and "adjustment deleted." problem is it should filter for the cells containing for those words as that Column are for comments such as "adjustment deleted due to erroneous upload."
The code below pretty much captures the gist of what the code should be:
The problem with the code above is that i need to click yes for deleting the deleted adj sheet and the code above debugs when there is no deleted adj/reversal![]()
Please Login or Register to view this content.
Is this data in 2 separate sheets? Its better you explain with the help of a sample file. You didnt attach one at the beginning so i actioned according to your 1st post.
I think the problem is that when there are no deleted adjustments and reversal adjustments, the code debugs. And with your code, it only filters "deleted adjustments" and "reversal adjustments" as is. I need to filter it with words containing the two criteria.
I am not able to open your zip file since i have an issue with zip files. Maybe you can attach the excel file directly.
And you can also try this code to pick up rows containing that text -
![]()
Please Login or Register to view this content.
Can't upload it file is too large
for some reason this one is not working
Are you getting an error?
You do not need to upload your entire file. Just a sample file with dummy data, as long as the format matches the original file.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks