Sheets("Oven Codes").Select
Rows("3:3").Select
Selection.Delete Shift:=xlUp
Sheets("Item Edit").Select
Range("I12:J12").Select
What I would like to do is have VB look to E1 to determine which row to delete. E1 could say 5 or 25.
I am all the time doing something like this. Is there a formula or something of that nature that would sum every 6th cell down starting a a given point?
I'm having real trouble selecting a series of rows based on variables for the purpose of cutting them and pasting them elsewhere in the spreadsheet. For example, if this is my spreadsheet
row 2 I Hate 3 Bill 4 O'Reilly
I want my code to select the range of 2:4, cut them, and paste them elsewhere but I want 2:4 to be variables. For example
Fun = 2 Stuff = 4
Rows(Fun:Stuff).Select Selection.Cut
But doing "Rows(Fun:Stuff).Select" does not work at all. If you do Rows(Fun).Select, this works to select Row 2, but I can not use the variables to select a range.
Ok, so I'm a little cheezed that I've been volun-told to give up an economic model that took me over 8 months to develop to a few investment bankers that will likely sell it to the highest bidder. Of course, with no credit to me.
I've already taken a few of the necessary steps to lock it down.
Examples:
- Lock/hidden cells along with sheet protection (with password) - to prevent viewers from seeing the formulas I used.
- protect workbook (with password) - to prevent copy/paste of the sheets
- VBA - Tools - VBA Project Properties - Protection - Set password - to prevent viewing of the macros
- Hiding sheets using "Very Hidden" in VBA - to prevent viewing of sheets in general.
I guess my real question is, when this is all said and done, how easy is it for someone to break through all the passwords that I've set up in the workbook? If it's ridiculously easy, how do I prevent it (if at all)? What else can I do?
I have a workbook with over 100 worksheets (all worksheet tabs are named). Since the tabs are not sorted in a numerical order (they are grouped by departments hence the numerical tab order does not apply), can I search for a particular worksheet tab using a search function? The CTRL F function doesnt allow searching for worksheet tabs. At the moment, I have to go through the tab names in order to find one particular tab.
I have entered VBA code and tested it with success. If I then save & close the excel file and then re-open it, the mask time entry is not saved (time does not appear correctly after input) and per instructions I have designated (and am using) the cell input range.
I'm trying to write a VBA script which will delete all rows in my Excel spreadsheet where Column I (which contains a status code) does not contain the word "Completed".
At the moment, I'm doing this the other way round: my script is able to search for entries in Column I which contain the status codes "Pending", "Awaiting Authorisation", "In Progress" etc and delete them. The idea is that when all those rows are deleted, I'll only be left with rows which have a status of "Completed". This works fine at the moment. However, the concern is that if a brand new status code is added to the data file, my script would be unable to pick it up and delete it. This is a small sample of the code I'm currently using (which deletes all the rows with statuses other than Completed):
I was wondering if there was an easy way to copy columns (headings) and the formulas to a new sheet. I'm currently working on Sheet 1, need to copy everything onto a new sheet so I can keep things separated by week..
Example, Sheet 1 is Week October 30th, would like my 2nd sheet to have same exact headings and formulas which I would then rename to Week Nov. 1st etc..
Also, is there a way that I can then copy the 4 sheets that would make up a month into a new spreadsheet so I can then start December...
I am trying to calculate weighted average cost for a list of thousands of items.
I will try to explain this as best I can.
Column A is item. Column B is Mode. Column C is Volume. Column D is Cost
There are only 2 Transmode Per Item. So each item is pretty much listed twice and I need to calculate the weighted average cost per item.
I know how to use the SUMPRODUCT function to calculate weighted average and could slowly go through the spreadsheet item by item calculating this, but is there a way to do this with some sort of formula? Similar to a Subtotal that would recognize each change item and calculate the Weighted Average at that change.
I have a spreadsheet that lists values for different grid lines. On top of each set of data, I have labels each line "Line A", etc. I want to put in possibly a pull down menu at the top of the sheet that the user could use to jump to whichever line they were interested in viewing. For example, if the user needs data from Line L, they could select Line L from the drop down menu and the spreadsheet would jump down to that area.
i was stuck with some mass data which spans over many rows and columns. i am relatively new to excel and wanted to know how i can get this data arranged in a way where i can access all the data from a printable view. i have attached a file explaining basically what i want.
If ActiveWorkbook.Sheets.Count < 17 Then Application.CommandBars("Workbook tabs").ShowPopup Else Application.CommandBars("Workbook tabs").Controls("more Sheets...").Execute End If
The code doesn't do anything on my excel workbook which currently has like 20 workbooks, and it grows daily by like 4 or 5 worksheets.
I have a Database and user form, in the user form i have a field named “Vehicle No” this is a combo box from which a user needs to select the Vehicle numbers, and all these are working fine now, I need your help in the following:
When user selects the second field named "Select Vendor name" i need a pop up window which shows all the Vehicles belongs to the vendor which they have selected, and with the popup window user selects the vehicle number then the Vehicle number combo box should be filled.
Currently users have to select by scrolling through Combo box which takes long time and difficult to find by scrolling.
I would like to add 2 buttons to each page. One button to add a row at the bottom of the table while keeping all of the same formatting and another button to Delete a selected row from the table. So that if there is more assignments than allowed in the current table, a row could easily be added.
I would think that the code for the class sheets would all be the same.
The other obstacle I thought about is possible making a button on the Summary page that would add another sheet, call it Class and whatever number comes next and also add it to the summary table with the same formatting (including the hyperlink that's in the Classes column where it will take you to the Class sheet that you want to drill down to).
I have attached the file. If the summary sheet is took much work it's not a big deal, I would be fine with just being able to have 2 buttons on the class sheets that allowed them to add and remove and such.
I would also like to contribute. I know a decent amount about SQL and SSRS/SSIS Reporting services.
I also need it to be able to unprotect my worksheet and then protect it back, Since I will only want them to be able to type in the areas I specify. I also moved the summary at the bottom of each class sheet to the right side at the top so its easier for them to view.
I have an excel file that i need to delete some empty rows in the file. it looks like this: I have to delete THE EMPTY ROW above each custom table, and leave everything else as it is.
empty row custom table data data data empty row custom table data data data data empty row custom table data data
See attached workbook. If you hit the Export button (runs Export Macro), it creates a new workbook. Most of what I have in the code works fine except the following bit:
I am using the code below to copy a sheet to new file end send via email. As I have some vba code in the sheet which I am coping I need to delete before sending.
I am looking for a vba code that will delete rows for me. have data in column E and I need the code to look for any cell that has the word "DELETE" in column E. When it finds the word "DELETE", I need it to delete the entire row. For instance if the first instance of this in cell E41120, then it should delete that entire row and look for the next instance to do the same.
I have seen codes out there to delete rows, but I can't get any of it to work for my situation.
I have a sorted range from the highest to the lowest in range B8:B50000. I need to find the first cell with zero value and last cell with zero value in this range. Then the these rows are selected and deleted.
I am looking for a code to create a new vba module. then cope all the code from 1 vba module(without empty line) to the newly created module. then delete the old vba module. does such a code exist?
My data comprises from B2:D2000 ( I am exporting data from SQL Server) so the data is in the horrible conditions , having blanks cells in these three columns . Columns E , F and G are empty.
Can someone help me in cleaning these empty rows in the three columns on the following conditions
delete entire row if column B, C and D contains empty or blank cells or zero delete entire row if any cells in Column C and D contains text values delete the entire row if Cells in colums A contains the word Map
the data in the column C is in the following format( Length x Width x Thickness) C2=78x36x4 C3=78.5x36.5x4.5 C4=7x4x3 C5=72x36x0.5 C6=72x36x19mm
Is it possible to get this data in the following form
I am using the following piece of code, which I have copied and modified from another workbook in which it worked properly.
Option Explicit Sub DeleteRows()
'Delete Unneeded Rows Dim lUsedRangeRows As Long Dim lRowCounter As Long
With ThisWorkbook.Sheets("Data") lUsedRangeRows = .UsedRange.Rows.Count
For lRowCounter = lUsedRangeRows To 3 Step -1 'work from the bottom up If DateValue(.Cells(lRowCounter, 5)) < DateValue(.Range("PayDate")) Then .Cells(lRowCounter, 5).EntireRow.Delete End If Next lRowCounter End With End Sub
I receive a "Type Mismatch Error" on the If DateValue line (highlighted red). PayDate is a named range for cell A2 on the same page.