Inserting Entire Blank Columns In Pre-existing Worksheets
Jul 7, 2007
firstly i am cross-posting this topic so here is the URL to the same thread in a different forum.
[url]
whats up everybody? i have to use two excel worksheets that someone else already created to make CSV (comma seperated value) files. these CSV files are to be dumped into a database. the problem is that the table has more fields than the spreadsheet does (the spreadsheet has 3 fields - network, mask, size - and the table has 10 fields). i can insert one entire column before (to the left of) network (for the ID field in the table) without a problem, but when i try to insert entire blank columns after size (to the right of the pre-existing columns) it only makes columns for the first 14 rows. i know this because when i save it as a CSV file there are only 6 extra commas for the first 14 rows. is there a way to insert an entire blank column for the entire spreadsheet (as in all the way to the bottom)? i dont want to have to manually type in all those commas. i am using excel 2002.
Suppose I have done a spreadsheet of,say 100 entries in alphabetical order in a column and I discover that I have missed 6. Is it possible to move the existing part from where I missed below this to make room for more entries without losing any of the entries?
I want to add (same) text to the end of a whole bunch of cells. What would be the formula or function in Excel 2007 for this? I want to add ":59" to the end of each of these:
I need to replace the values in the braces with the values in Column A. Is there an easy way to do this or am I stuck with doing each one manually? There are 92 lines in Column A.....
I'm Trying to change the value of a row when a determine condition happens, and I was thinking of doing it after the insert was made, but maybe it's easier before the insert (?) The thing is i've tried both, and i'm doing it wrong because it's not working
Code: With ThisWorkbook.Worksheets("Site Configuration List") .Range("A").EntireRow.Offset(1, 0).Insert ' Tried this .Range("A").EntireRow.Interior.Color = 49407
[Code].....
Obviously not at the same time, but no of those work. The call to the sub where the code above is implemented, is inside a loop, however, with each one of the things I've tried, when it gets to the line the program just stops. No error or anything.
I want to create 4 quarter sheets at the same time, but my code could only process 1 quarter sheet each time. Also, I have trouble of copying and pasting the values from yearsheet to the quarter sheets. ( see attachment document )
I'd like to create a macro that can access few existing worksheets from different workbooks and print them automatically when i press the button or select them.
Tried userform and listbox that were suggested from other thread, but that didnt work quite well since I'm not quite understand the code behind it.
I need the macro to look at cells B9:B84 on the Sheet1 tab of the Cost Template. If it finds an x I need it to copy the 3 cells to the right of the x and paste them in a template. For example if it sees an x in cell B9 it would copy cells C9, D9 and E9, open the Purchase Order to the Detail tab, then paste it to cells B3, C3 and D3. It would continue looking for an x down to B84. So if it found 5 cells with x, it would give me 5 instances of the Purchase Order with 3 cells pasted into each.
I've attached my Cost Template and the Purchase Order it needs to copy to. In the Cost Template is a macro called Create_PO. This is what I was trying to alter to make this happen. I can't seem to get it right! FYI in case it matters, I had to change the Cost Template from .xltm to .xlsm in order to upload it on this site.
I'm attempting to add a variable number of worksheets (dependant on the number of entries in an existing list), then rename those sheets to the name of the entries in that list. i.e.
LIST A B C With the list above, i'd want 3 new sheets added, one named 'A', one named 'B' and one named 'C'.
The trouble i'm having is that because the number of entries/sheets varies, i don't want to refer to 'Sheet1' 'Sheet2' etc. to rename them.
***Additional Info*** the first record in the list is always "W4" on sheet "Data"
Below is where i've got to so far (however, i'm pretty new to this so it's almost certainly not all that efficient!)
-Master worksheet copy/populate child worksheets at the press of a button or automatically if possible. -If copy pasting, it needs to overwrite the original data and not just duplicate it underneath in the child sheets. -I tried using the code from "[URL] ......" but could not tweak it quite how I wanted. -Any unique values without a child sheet, just ignore and leave in the master sheet or ideally add them into their own child sheet
I have multiple other macros going. Some details about my sheet:
-My table headers and filters come down to "A13:R" -All my information starts on "A14:R" which is what I want sorted. All of my worksheets have the same heads/locations. -The column "I" is where I want to take my info for sorting from. For example "I14" = grapes, "I15" = apple, "I16" = grapes. etc. So i would like all the apple rows to automatically go to the "apple" worksheet and the grape rows to the "Grape" worksheet.
I'm trying to build is a master Excel sheet for a company-wide budget tracker, where our supply person enters in information on individual orders. Those orders would be broken down in separate worksheets based upon department.
So, let's say you have three departments. Each department has an identifier code (Human Resources would have HR, Operations would have OP, and Research & Development would have RD.) Each order number is prefixed with the department's code, then the other columns deal with dates ordered and received, cost of the order, and any notes on the order.
What I'd like to be able to do is to have each order be automatically filtered out to secondary worksheets, based upon which department the order belonged to.
I have seen a macro that allowed one to push a button and break data out like that, but the problem is that it created new worksheets each time, and I want the department worksheets to stay the same (since each of those can expect to have starting budget figures updated by the supply officer.)
When I click the general Excel program icon that use to just open a blank excel workbook, it now always opens the same existing file (apples.xls) If I am clicking on a different existing file (pears.xls), excel opens pears.xls and apples.xls.
I have a spreadsheet with thousands of columns. Due to poor planning on my part I need to insert a column between each existing column (e.g. I need to insert a column between the existing columns A and B, B and C, etc...). I would rather not have to do this manually thousands of times.
I have a workbook that consists of 15 worksheets. I want to be able to click a button to add a row to sheet one and have it added in the other sheets in the exact same place. To complicate it a bit I want it to add it in the same place on the sheet each time (between rows 10 & 11)
I did find a post on how to add a row to sheet one but it adds multiple rows to sheet two with special colors and formulas. I just need it to work like when you insert a row normally. (format and formulas)
I have a code now that in excel, when the button is clicked, will put file into a new email and format the email.
What I have been trying to do, is make it so that if Cell C10 is blank, you get a prompt telling you it must be filled out before you can proceed with the submission.
Here is the code now:
Sub SendTimeCard() On Error GoTo err_handler Dim OutApp As Object Dim OutMail As Object
Dim subject As String Dim body As String ' Be sure the workbook is saved first ThisWorkbook.Save
Looking for assistance in inserting 24 blank rows in between a column of names. And if not too much trouble have the ability to enter the number of blank rows to insert.
Before: Column A name1 name2 name3 etc.
After: name1 blank row blank row etc. name2 blank row blank row etc. name3 blank row blank row etc.
I have a file with a roughly 20 workbooks. I need to split the data in each workbook into two sheets, rename each sheet, then export the data to template with multiple sheets. After splitting the data into the appropriate sheets in the original workbook, Sheet1 in has only 1 row (plus header) and needs to be transferred to "Project Entry" in the template; Sheet2 can have any number of rows (less than 100) and needs to be transferred to "Activity Entry" in the template. I need to save the template based on the value of cell A1 on "Project Entry" sheet of the template. The organization of the columns in the original workbooks is different than that of the template, so this is not a straight copy and paste operation. The cell formatting in the template must be retained.
I have half of this under wraps. I've cobbled together some code that splits the original data where I need it split, copies it to new sheets and saves the files. I now need to figure out out to get it out of this saved file and into the template.
The crosswalk of values between the original data (Sheet1) and the template(Project Entry) needs to look like the below. So, variable 1 exists in column B of the original and needs to populate column B of the template, and column Q in the original needs to populate column G in the template. The variables and column relationships are different for Sheet2/Activity Entry.
I have a workfile, containing dates in column C and values in column G.
The data is imported. In most instances there are no dates in line with the second value. I need VBA code that will insert a the same date in line with the first value below the cell where there is a date....
I have an Excel file that contains several worksheets. I would like to add a forumla to the next available cell. For example, if coulmn F contains the set of numbers to be sum the formula should be placed beneath the last number in column F. Each worksheet has a different length, the worksheet name will vary, and the number of worksheets will vary.
I know how to accomplish this task using the code below when the sheet name is known. Since it is not known I am unsure of the code.
I'm a novice in VB and can't work out how to solve the following problem:
I have imported NMEA-data in text format from a GPS into Excel. This data is acquired in real-time at 10Hz, which borders what the GPS in capable of calculating. As a result the data isn't quite reliable enough - there are strings missing and some lines have been skipped by the GPS. This is a typical example of what sometimes happens: ...
I would like to know how can i insert a blank row in between ACC# when ever a new series of data begins
name Acc # Balance Date John 2222 200 june 2013 John 2222 344 june 2013 John 2222 700 Sept 2013 Silva 4444 333 June 2013 Silva 4444 333 June 2013 Silva 4444 333 June 2013 Raff 5555 897 June 2015 Raff 5555 897 June 2015 Raff 5555 897 June 2015 Raff 5555 897 June 2015
I've got a spreadsheet that I prepare for a group that has patient data subtotalled by physicians. The problem is that the group uses this data for data entry and wants a blank row between each different patient name within the physicians subtotals and I have no clue how to get there. Any chance there might be some VBA code that could accomplish this?
I have Excel 2002. If I start the program it opens with a blank workbook, called "Book 1".
If I then open an existing workbook, I have two Excel buttons in the Windows taskbar: the one I just opened, and the blank one titled Book 1.
At work I have Excel 2003. The blank "Book 1" is also there when I start the program, but if I then open an existing workbook, the Book 1 goes away. I like this way better.
My question is: Is this just the way versions 2002 vs. 2003 work, or can I change a setting somewhere to make Excel 2002 close its default blank workbook when I open an existing one?
I came across this code that selects (and extends) cells between the active cell and the next cell with data.
Is it possible to modify this so that it selects the entire Rows ?
Code: Sub Test() If Selection.Select "" Then Range(Selection, Selection.End(xlDown)).Select Range(Selection, Selection.End(xlToRight)).Select Else Range(Selection, Selection.End(xlToRight)).Select End If End Sub
I am using the following macro to delete "completely empty" rows. I also need to delete some rows if a cell in column B has no value. How would I change this macro? ' DeleteBlankRows
Dim r As Long Dim C As Range Dim Rng As Range
On Error GoTo EndMacro Application.ScreenUpdating = False Application.Calculation = xlCalculationManual
If Selection.Rows.Count > 1 Then Set Rng = Selection Else Set Rng = ActiveSheet.UsedRange.Rows End If For r = Rng.Rows.Count To 1 Step -1 If Application.WorksheetFunction.CountA(Rng.Rows(r).EntireRow) = 0 Then ActiveSheet.Rows(r).EntireRow.Delete End If Next r