Inserting A Column To Thr Right Of Selected Cells

Dec 18, 2006

This may sound trivial, but how do you insert a column to the right of the current selection?

If I do Selection.EntireColumn.Insert that inserts a column to the left. Anyone know how to do this?

View 9 Replies


ADVERTISEMENT

Excel 2010 :: VBA Code For Inserting Text In All Column B-cells Of Multiple Selected Rows

Jul 11, 2012

Software: Excel 2010, Windows 7

What is the VBA code for inserting text in all column B-cells of multiple selected rows?

I am creating a worksheet with a table containing various data related to orders of various materials (this is more or less data gathering from an older, paper-based 'system'). This table spans, columnwise, from A to D and expands downwards as more orders are added. The information in each column is: A=order number, B=type of material and C=material specs. and D=additional comments.

I've set it up so that the only thing I really have to do is to insert the type of material in the cells of column B, and the rest will sort itself out. Instead of having to insert a new row for each new entry and manually typing in the name of the material (these entries are often done in the midst of already existing data), I created several similar, macroed buttons for the different types of materials we use. These macros work by selecting the row of the currently active cell, inserting a new row and then add the name of the material in the column B-cell of this new row. What I am having trouble doing though, is to get the text-entry to work for a selection of multiple cells.

As an example, lets say that I would like to add 5 orders of "Grade A Steel" in the middle of the table - in the row above row 8. With the macro I currently have I can select cell B5, click the macro, and a new row will be inserted with "Grade A Steel" in column B of this new row. This action could be performed 5 times over, but would be easier if I could just mark a range of 5 cells, say B8:B12, click the macro and get the text/data inserted the column B-cells of all 5 of the new rows. So far I've been able to create a macro that inserts multiple new rows, but I've only been successful in filling the column B-cell in the first row leaving the 4 below empty.

View 8 Replies View Related

Inserting Cells Into Existing Column?

May 2, 2013

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?

View 3 Replies View Related

Inserting A Space Between Text In Cells Belonging To One Column?

Jun 5, 2014

I am operating Excel for Mac 2011 version 14.4.2

I have a list of 1500 addresses in a column, something like, 5VistaTerrace, and I need to insert a space between the number and each of the words so that it reads 5 Vista Terrace in the cell.

All of the addresses are different, some with 4 or 5 words like 5ABrownBayCourt... that particular one I would want to read 5A Brown Bay Court in the end.

Is there a formula or excel trick I can perform to save me the time of manually adding the spaces?

View 1 Replies View Related

Cannot Shift Nonblank Cells Off The Worksheet When Inserting Row/column

Jul 12, 2006

When I try to insert a row, Excel displays the warning "cannot shift nonblank cells off the worksheet". I understand what the warning means but there are no nonblank cells at the bottom of my worksheet! Just to be sure, I have selected the bottom-most rows, cleared them, deleted them, and everything else I can think of. The warning still appears.

View 3 Replies View Related

Inserting Range Above Selected Row

Mar 8, 2012

I have a range (of 2 rows) that are set up as a header row and sub row. I want a macro to insert these above the active row (ie. where the user places the cursor), but when I select and copy the range in the macro, I don't know how to refer back to the 'active row' because that's not active anymore.

I'd also like the cursor then to be placed into one of the cells in the new row, ready for the user to start editing.

View 6 Replies View Related

Excel 2010 :: Inserting New Rows In Selected Files?

Mar 3, 2010

I have problems inserting new rows in selected files. The files with the problems have a macro. I don't know if the problem can lie within the macro. There is no error message, it just won't insert the new row(s).

View 4 Replies View Related

Copy Data Cells Only In Selected Cell Column

Oct 18, 2006

I have a macro that loops through several workbooks and copies data to one common sheet. Works great with one flaw that I have not been able to resolve. I am using the End Property example below, this works great as long as there are more than one cell with data. With one cell having data this takes you to the bottom of the sheet.

Range(Selection, Selection.End(xlDown)).Select
Selection.Copy

Need code to select from a specific cell to the last cell in that column with data where when the selected cell is the only one with data that would be the only cell selected.

View 2 Replies View Related

Inserting Multiple Cells And Shifting Down Column Multiple Rows In IF Statement

Sep 7, 2012

how to shift data in a column down multiple rows while in an IF statement. I am assuming you cannot just simply repeat the insert cell formula.

Here is my code - it's ugly but it was working when I just needed it to move down one cell:

lastrow = Range("A2").End(xlDown).Row
For i = 2 To lastrow
Range("B" & i).Select
If Range("B" & i).Value = Range("B" & i).Offset(-1, 1).Value Then

[Code].....

View 1 Replies View Related

Fill Range Of Cells With Text When Listbox Option Selected - Clear When Not Selected

Jul 25, 2014

I am using this code to hide or unhide rows of text on another sheet:

VB:
Sub ProcessSheet1ChangeOnCellJ7(ByVal Target As Range)

Dim sAddress As String
Dim sValue As String

'Get the address of the cell that changed without '$' signs
sAddress = Target.Address(False, False)

[Code]....

When the "Not Pursuing" list box option is selected (in cell "J7" or "J8" in Sheet 1) I need to add (or over-write) "Not Pursuing" to the range of cells in column "B" (in the "Tasks" sheet), but only for that particular Goal, meaning a limited range of cells in column "B". If the "Pursuing - Show All Tasks" option is selected for a Goal then these same cells need to be blank so that the appropriate person can enter their name into the cell.

The purpose for adding "Not Pursuing" automatically to these yellow highlighted cells is that it will facilitate filtering of tasks by individual in the "Tasks" sheet..

Again I have tried several times to upload a sample file and am unable to, which I know makes it more difficult to solve. (Is there some common mistake people make? I know it's an allowed format and is very small in file size....)

Code solution can be entered directly beneath:

VB:
If Target.Value = "Not Pursuing" Then
ActiveWorkbook.Sheets("Tasks").Rows("29:29").EntireRow.Hidden = False
ActiveWorkbook.Sheets("Tasks").Rows("30:48").EntireRow.Hidden = True

View 1 Replies View Related

Find Total Hours By Searching Entire Rows Below Selected Cell Versus Cells In A Column

May 19, 2014

I'm using the following code to delete select rows one at a time. I need the last row in the range to remain therefore I prevented the user from deleting the row one up from the row that contains "Total Hours" (which is always in Column B). The code works great as long at the user clicks into a cell in column B. If the user clicks into a cell in column A, C, D, E, F, G, H, or I then the code allows the user to delete the last row.

I believe I need to search entire rows to determine if the row contains "Total Hours" .

[Code] .......

Attached File : Staffing Report 1.44.xlsm‎

View 6 Replies View Related

Inserting A Column

May 15, 2008

I have Data in Column a There in not demarcation between two Groups of Data

I want it Insert a Row between the two Groups of data.

Each group of Data end with a cell has "Employee" in it

The Row is to be inserted after the cell having “employee”

View 9 Replies View Related

Inserting 2 Columns After Each Column?

Apr 23, 2012

I have data in 4 columns, A, B, C, D. Each column has 5 rows of data. I want to write a macro to automatically insert 2 columns, after each column in original dataset.

View 8 Replies View Related

Inserting Formula In Every Other Column?

Mar 26, 2013

Is there a quick way to copying formula's from one column to every other column? I am using about 1000 columns.

View 6 Replies View Related

Inserting Column Macro

Dec 22, 2006

simple little procedure to insert columns on two sheets and call each by the same name. Macro runs off a command button and inserts a column at E:E and gives the user an input box with which to name the inserted columns.

Code: ...

View 9 Replies View Related

Inserting Into A Desired Column

Jun 20, 2009

How in excel do I get a no. to appear in a column dependant on a reference in a different cell. For example If i type March in a cell I want the number 1 to appear in the March column of a table.?

View 9 Replies View Related

Inserting An Extra Column Width Bar

Aug 6, 2009

the Ruler across the top that allows you to adjust the column widths (A B C D etc). Is it possible to insert another Ruler, further down the same page, to allow you to adjust the column width differently. if so how. On Excel 2007

View 2 Replies View Related

Inserting Rows Or Column In Excel?

May 2, 2014

macro for inserting rows and column in Excel.

View 1 Replies View Related

Inserting Sequential Numbers Into A Column

Oct 1, 2009

I have a column of an undefined number of rows where I need to add item numbers from 1 to however many items there are, starting from A9 downwards.

The last 3 used rows on the sheet contain signatures etc so it should not number the bottom 3 rows.

pretty sure its fairly simple code but i dont have anything similar from previous files that i can re-use to do this :p

just needs a simple

count how many rows are blank from A9 downwards (to say A200)
for num=1 to count do
Cell range(A(9+num) = num
end

i just dont know the code well enough to write it and make it work :p

View 3 Replies View Related

Inserting Variable Into Column When Corresponding Value Is True

Nov 28, 2011

I have a workbook with 2 worksheets. 1 Worksheet contains a data table and another table contains a form

Worksheet 1 (Data)
[A] [B] [C]
1) [Material #] [Batch #] [Destruct Form #]
2) 10 100A 1A
3) 10 101A
4) 20 200A
5) 30 300A 2A
6) 30 301A

Worksheet 2 (Form)
[A] [B]
1) [Destruct Form #] [3A]
2)
3) [Material #] [Batch #]
4) [10] [101A]
5) [20] [200A]

I am looking to create a macro which, when executed, will:

1) search sheet 1 column B for any instances where a "batch #" from sheet 2 column B appears
2) add in the corresponding "Destruct Form #" from Sheet 2 Cell B1 into sheet 1 column b

Therefore after the Macro is run, sheet 1 will look like this:

Worksheet 1 (Data)
[A] [B] [C]
1) [Material #] [Batch #] [Destruct Form #]
2) 10 100A 1A
3) 10 101A 3A
4) 20 200A 3A
5) 30 300A 2A
6) 30 301A

View 9 Replies View Related

Inserting Column And Dragging Down Formulas

Jul 5, 2006

I have a long list of inventory parts and there can be additions or deletions at any time. Currently the inventory is determined using formulas from other worksheets and this uses formulas. If I have a user insert a row to create a part in inventory, is there a way to make the formulas automatically be created in the cells within the row?

View 4 Replies View Related

Trying To Find Max Date In 1 Column For Selected Text In Another Column

Apr 10, 2009

I have 2 columns: Locations (Column A) & Dates (Column B).

I want to find the most recent date for a selected Location (stored in $G$1).

currently I have in C2: =If($A2=$G$1,$B2,"") copied down the column to the end of data (currently C153). Then in C1: =Max(C$2:C$153).

I also have in D2: =If($C2<$C$1,$C2,"") copied down to D153, and in D1: =Max(D$2:D$153) to find the 2nd most recent date.

Is there some way to condense this into just 2 cells?

See attached file for example (note the columns are currently sorted by date, but that is not always the case).

View 14 Replies View Related

Deleting And Inserting Cells

Apr 14, 2009

The delete function has disappeared from my EDIT menu in excel. Delete and Insert has also disappeared when I right Click on the spreadsheet.

View 11 Replies View Related

Inserting Characters Into Cells

Aug 4, 2009

I have recently purchased a new GPS for my fishing boat. I am trying to transfer my old coordinates from one unit to the other. I am using a .csv file to achieve this. Can some kind please let me know (and possibly tell me) if there is way to insert characters and spaces in to multiple cells. I have over 800 individual coordinates to modify to the new gps and this would take a long time to achieve individually.

I need to replace this: 12.34.567 to this: 12 34.567 N

and this: -1.23456 to this: 001 23.456 W

View 9 Replies View Related

Inserting New Row In Between Cells With Formulas?

May 29, 2012

I have a spreadsheet that has formulas in cells C3 to C10 (cells C3 to C10 have =(sheetc), (cells C3 to C10) formulas. I want to be able to add a row somewhere in between those cells and have the that new row take on the same cell formula as the others...resulting in cells C3 to C11 now having formulas..

View 1 Replies View Related

Inserting Blank Row And Organizing Time-column

Jan 31, 2009

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: ...

View 15 Replies View Related

Excel 2010 :: Inserting Column Without Formatting

Sep 30, 2011

Whenever I insert a column in Excel 2010 it takes the formatting from the Column to the left. I want to insert a Column without formatting. Just a blank column.

View 4 Replies View Related

Inserting Colums And Summing Column Data? !

Feb 16, 2007

I have the following sheet with reg hours and ot hours. I need to insert a column that sums these two items. I used the macro recorder and it only works when the same amount of ID's or less. If there are more ID's it does not sum the remaining ID's. What it currently looks like:.........

View 3 Replies View Related

Restrict The User From Changing Or Inserting A Value In A Particular Column

Aug 16, 2007

I m just looking out for some code where i can restrict the user from changing or inserting a value in a particular column in excel

View 9 Replies View Related

Inserting A Block Of Cells Using An If Statement

Jun 26, 2008

task of inserting a block of cells into a worksheet.

I have saved 4 different blocks of cells and depending on an option chosen from a drop down menu i want to select one of more of these sets of data and paste them into a worksheet.

View 10 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved