Excel And VBA - Insert Group Of Cells Or Delete Them?

Apr 12, 2013

I am working on a contact information form for given relationships, and I'm trying to figure out the best way to design a button that copies the "form" (not an actual VBA form but a grouping of formated cells for information collection) and inserts it into the document. I would also like a button that deletes unused and empty forms so that we only print forms that are filled in.

I tried recording a macro to do it, but it's messy and creates issues with hidden rows and pagination.

View 4 Replies


ADVERTISEMENT

Excel 2010 :: Unable To Right Click For Format Cells - Insert Or Delete

Sep 27, 2011

Just recently My Excel 2010 has decided to not let me right click to format cells, delete or insert rows. I can do these functions from the ribbon, but not via right click. this happens in both existing spreadsheets where I am the author, or even a brand new spreadsheet like in the image below. we have restarted the computer, Uninstall and reinstalled Office and still get same symptoms. I got here thru google but cannot find an answer anywhere.

I am very computer literate and even our IT personnel have looked at this with no answer. as you can see in the image, these options are greyed out.

Running Office standard 2010, Windows 7 pro x64

View 8 Replies View Related

Insert Group Header Based On Consistent Value Within The Group?

Feb 10, 2014

I have several groups of data in the same sheet. Each group has two blank rows above the first row of data. Each group has column "B" in common (e.g., "Phone" in the example attached). I'd like to add a title/label of "Phone" to the first column in the row immediately preceding the first row of data for that group.

View 1 Replies View Related

Macro To Find Word And Delete Group Of Cells?

Aug 1, 2014

I have an excel file, where there is a section "Additional Requirements". This section is repeated like 20-25 times in the sheet and has a group of merged cells below it to enter data as shown in the picture. Issue is that majority of these "Additional Requirements" are not filled by the user. Hence maybe only 3 or 4 are filled and I have to manually delete the rest. I tried the code below, but it doesn't do anything.Running the macro just jumps the cells slowly downwards the sheet. Maybe if the macro runs 10-15 times it reads the whole code and then moves on to the next row.8-1-2014 12-43-27 PM.png What I'm trying to achieve is:

1. for the macro to find "Additional Requirements"

2. Then check the Merged cell below it (thus the offset)

3. If this cell is blank, select this cell and the cell containing "Additional Requirements"

4. Delete entire rows of these cells/delete the selection (entirerow.delete). (I read somewhere to set a variable as selection and clear it, hence ive included in the unreadable code. This wasn't working either)

View 4 Replies View Related

Change Color Of Group Of Cells Based On Data In Another Group Of Cells

Jan 12, 2014

Conditional formatting. I want to change the color of a group of cells based on data in another group of cells. Example:

If cells G8 and G9 (which are merged) are between 80% and 94%, then I9,I10,I11 (which are merged) will turn Yellow. Also, under the same scenario, IF G8 and G9 is greater than 94%, then cells I9, I10, I11 will turn Red.

View 2 Replies View Related

Excel 2007 :: Formula For Highlighting Cells Within Sub-Group

Jan 26, 2014

I am using Excel 2007 with a WIN XP OS…. My objective is to color code each cell in Column F within each sub-group based on the following instructions:

1) Column F contains a percentage…. Each sub-group in Column F totals 100%.... Each sub-group is separated as shown on the enclosed sample.
2) Starting with the highest percentage, followed by the next highest, (etc.), I want to sum each subsequent cell until reaching a target threshold (total sum) of 62%.... All cells in this grouping to be highlighted “yellow”.
3) Once the 62% target threshold is reached, the very next highest subsequent cell percentage is highlighted “light olive”…. If there is a tie, the lower number shown in Column E serves as the tie-breaker.
4) All remaining cells within the sub-group are highlighted “light brown” including those denoted by 0%.
5) Finally, if the cell is blank and absent of a % call out, then no highlight is required.

I process a daily spreadsheet having typically in excess of 1000 rows and in turn, I’m looking for a method to automate the color coding….

PGM
HORSE
MLO
PRICE LINE
PL RANK
New PACE

[Code] ........

View 6 Replies View Related

Using VBA And If Statements To Delete / Shift Up And Insert Cells

Sep 7, 2012

I am trying to create a macro that will add and delete individual cells depending on an IF statement. The code that I created deletes/adds cells regardless of the IF statement.

If Sheet1.Range("F3").Value = Sheet1.Range("G2").Value Then
Range("G2").Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
End

ElseIf Sheet1.Range("F3").Value = Sheet1.Range("G4").Value Then
Range("G3").Delete Shift:=xlUp
End
End If

Also, what is the easiest way to have this code apply to all rows within column F, while adjusting the corresponding cells referenced in column G? The last row within the spreadsheet changes.

View 3 Replies View Related

VBA To Search Group Of Cells And Input Message If Value Is Missing From Group?

Mar 17, 2014

I am trying to write VBA code that groups cells between blank rows and inserts a message if a string of text (a name) is missing from the entire group. I want the code to search cells in column A and group the cells between blank cells. Use the name I input in an input box as the search criteria and insert a message in the Column C next to the last blank cell in the group and then move on to the next group and highlight the cell in red with bold text. I am including a spreadsheet with an example of what the sheet should look like before and after the code is run.

View 11 Replies View Related

How To Insert Group Between Another

Jun 10, 2013

How to insert a group between another - see att. picture.

I have tried several solutions but havent yet found the right one.

The rows are not locked.

Picture: Capture.PNG

View 6 Replies View Related

How To Insert Blank Row After The End Of Particular Group

Mar 18, 2014

I have data like this in column A

ram
ram
ram
reddy
reddy
reddy
lakshman
lakshman
lakshman
and i want to incert blank after the end of each group and i am expecting like this
ram
ram
ram

reddy
reddy
reddy

lakshman
lakshman
lakshman

is it possible to do with simple formulas or i need macro for this? i have huge file with lot of groups like this i can not do this manually by using filters. have look on attched sheet for better understanding.

sample (2).xlsx‎

View 4 Replies View Related

Insert Text In A Group From A Drop-Down List

Aug 22, 2008

I'll set up the situation first: I have a group of cells (arranged in a esthetic manner) across several rows of columns. For example, column A1 to N1, rows 1 to 5.

I'm hoping to set up a drop-down list in a cell (we'll use A2 as an example), with different options that will determine what text is displayed in different cells in the group when the user selects it.

For example, if I selected option 2, it would display different text in cell B4 than if I choose option 1. Again for option 3, etc.

If this is at all possible, there is an additional question. Can this format also insert drop-down lists, instead of text, in select cells?

View 9 Replies View Related

Delete Every Nth Group Of Rows

Mar 12, 2007

I'd like to select a range and then delete the top 10 rows, then skip down 500 rows and delete another 10 rows, and so forth until the end of the range.

View 9 Replies View Related

Excel 2010 :: Macro To Insert Formula Into Cells?

Oct 6, 2011

I'm trying to create a macro to insert a formula into a specific cell. The formula is meant to check if a cell has text, and then if it does, search for the text on another page.

I had a go at the code, but keep getting Runtime error 13.

I'm using Excel 2010

Code:

Sub new_entry()
'
' NEW_ENTRY Macro
Dim rowNo As Integer

[Code]....

View 6 Replies View Related

Excel 2003 :: Macro To Insert Cells When Paste Data

Jun 11, 2013

I have two spreadsheets in Excel 2003.

Spreadsheet 1 has 10 columns of data (A-J). I want to copy a variable number of rows from spreadsheet 1 to spreadsheet 2.

When I paste into spreadsheet 2, I'd like to automatically insert blank cells in three places, taking the total number of columns to 13. I'd like columns C, F and I to be blank, and the last column with data to be M.

I will perform this task regularly, and add the copied cells to the bottom of spreadsheet 2, so I'd only like to insert blank cells within the range that I'm copying, not the entire spreadsheet.

I will then populate the blank cells with a VLOOKUP function. Do I need another macro to automatically add the formula to the cells, or is there a way to include this in the cell-inserting macro?

View 1 Replies View Related

Delete Some Rows Subtotal By Age Group Then Grand Total

Oct 21, 2011

Import Financial System -Recaps Trial BalanceFrom Date:31-Jul-2011,To Date:27-Aug-2011,
Requested By:Jenny Drumm,30-Aug-2011 9:28 AMAge Range: 0 - 30, No. of recaps: 231
Broker File NumberAgeVendor/Co/DeptFirstBankAssistsFRTBRODTYLoadsInvInvClaimsGL AcctTRUETRUEBalanceCostFeeRecptsAdjRecptsROE VarLC Var

[Code] ........

There are more age groups, & some groups have hundreds of lines. Each of the total line in the report has a number plugged in by the system, which, because of rounding, may be off by several cents. I figured out how to move the rows with Broker File Numer, etc & the row after it up above the first Age Range.

What I need to do next is:Delete all rows between "Age Range: ....." and the start of that range's data.Delete all blank rows between "Totals" and the next "Age Range: ...."Delete 5 rows after "Grand Total"Put a formula in the row immediately above each age range's "Totals" for each column, summing all the data for that column, in that age range. (Hopefully with the word Total in column B of that row, too)Put a formula in the row immediately above the "Totals" after "Grand Total" that adds together each of the Age Range totals.(I did figure out how to get the "Balance" cell in each row to sum that row going right to left, so at least I got a start! For that I'm using

Code:

LR = Range("C" & Rows.count).End(xlUp).Row
With Range("R10:R" & LR)
.NumberFormat = "#,##0.00_);[Red](#,##0.00)"
.HorizontalAlignment = xlRight
.VerticalAlignment = xlTop
.FormulaR1C1 = "=IF(ISNUMBER(RC3), Sum(RC5:RC17), " & Chr(34) & Chr(34) & ")"
End With

View 2 Replies View Related

Duplicate Cells Delete BOTH Rows In Excel

Nov 12, 2013

I have a report with about 7000 rows in it. I need a macro that will find all rows where column A and column B are the same as another rows column A and column B and delete both rows.

View 4 Replies View Related

Delete Extra Useless Cells From Excel File?

Jan 20, 2013

I have some excel files that contain data when I'VE finished entering data >> I saved it when I open the file >>> I FIND THE DATA INTACT .. NO PROBLEM BUT I FIND ALOT OF EMPTY CELLS THAT ARE USELESS I WANT TO DELETE THESE EXTRA EMPTY CELLS... SO WHEN I OPEN THE FILE I CAN FIND ONLY the data .

I have attached a file as an example

View 14 Replies View Related

Excel 2010 :: Cell Insert In One Column To Insert In Other Columns?

Mar 23, 2012

I have a master data sheet with four columns, A, B, C and D

Column A has the primary data and B,C,D has dependent data values;

So when I insert a new cell in Column A with cells Shift Down, I want mandatorily new cells to be inserted in the same row in col B, C and D as well so that data integrity is maintained;

View 2 Replies View Related

Insert Excel Formula Using VBA......MATCH Function Is What I Want To Insert

May 7, 2009

I can use the MATCH function when i am in excel but i am having trouble getting it to work when i am trying to insert the formula using VBA.

Here is the code i have but it wont even compile........

View 9 Replies View Related

Excel 2010 :: Delete Duplicate Rows Based On Values Of Cells

Jun 17, 2014

I'm new to VBA and macros, using Excel 2010, and am trying to figure out how to delete all duplicate rows in a sheet where 2 or less of their values in column A is "1". I'd like have a script that is flexible enough to change to 3 or less if need be. I also have a header row that needs to be offset in the process.

A---B-
0--123 <-delete
0--123 <-delete
0--123 <-delete
1--123 <-delete based on this the value of column A
0--123 <-delete
0--123 <-delete
1--321
1--321
1--321
1--321
1--321

or

A---B-
0--123 <-delete
0--123 <-delete
1--123 <-delete
1--123 <-delete based on this the value of column A
0--123 <-delete
0--123 <-delete
1--321
1--321
1--321
1--321
1--321

View 5 Replies View Related

Excel 2010 :: Macro To Delete Text From Cells And Leave Dates

Apr 27, 2012

I am using Excel 2010 and I need a macro to delete all text from cells and leave the dates.

Below is an example of the contents of six cells. Some have just text, but some have text and dates.

1st Time Attender: 4/8/20121st Time Attender:1st Time Attender: 4/5/20122nd Time Attender:2nd Time Attender: 4/8/20122nd Time Attender: 4/5/2012

In this example, I would want the new cell contents to be:

4/8/2012

4/5/2012

4/8/2012
4/5/2012

View 1 Replies View Related

Excel 2010 :: VBA Code To Search Multiple Columns And Delete Any Duplicate Cells (not Rows)

Jun 12, 2014

My Excel program (Excel 2010) currently has several columns and each column looks for and pulls data from a specific file on my computer. Then I need to delete any duplicate data entries, count the number of unique entries and track the changes through a chart. I have everything done except I cannot figure out (or find on the internet) a way to search in multiple columns (more than 2) and delete just the duplicate cells. I want to delete the cells in a way where there is one left. For example if the code 12gf is duplicated three time, I want to be left with one 12gf (it doesnt matter what column the original one is left in). Additionally, column length changes and they are not sorted. I have attempted to attach an image of an example file below.

View 14 Replies View Related

Excel 2010 :: Use Range Of Cells With URLs To Files And Check It They Exist - If False Delete To End?

Oct 24, 2013

This is Excel 2010 on Windows 7

Trying to figure out a VB Script but don't know where to start.

I have a sheet for each month. lets take September 2013

A Column with 200 Servers (A1:A200) on the Intranet listed as server-1/, Server-2/ Server-3 ... Server-200/
Each Server lists a location of a file for each day (31 columns per row)

I am trying to check for the existence of the files on each server (The Cells contain the URL and File Name in Range B2:AF201) starting with server-1 check the URL in B2 if it exists, go to C2, Continue with that row until the file check is False (The Page will show a 404 error) if not found delete cell url and continue. do this for all 200 rows

View 3 Replies View Related

Excel 2003 :: Group And Outline

May 14, 2013

In Excel 2003 I have Manually Grouped a number of rows. (Data>Group and Outline>Group).

If I use the buttons with the numbers 1, 2, 3 (indicating an outlining level) to collapse or expand the outline I receive the Error Message: "Cannot shift objects off sheet."

If I use the collapse button (-) or expand (+) button the data collapses and expands as I would expect.

I am aware of the normal issues surrounding objects and outlining and have ensured that I have changed the properties of all my of the objects in the sheet to "Move and size with cells". There are no comments in the grouped rows.

View 4 Replies View Related

Rotating Group Of Shapes In Excel VBA

Feb 4, 2014

I did use the solution in a thread by Andy to make a picture or shape rotate. It works perfectly as a standalone. With this I mean all the information on the same sheet as per example in the file 901259.

I'am using it to rotate a dial. The problem is instead of using the value from the sheet itself I link the scrollbar to a cell on a different sheet in the same workbook. There some calculations are done and the value which makes the dial rotate is linked to that sheet. The dial however is on another sheet.

The calculations are almost displayed realtime but the dial is lagging. How would I go about to "solve" this lagging.

View 6 Replies View Related

Add One Group Of Cells

Apr 12, 2008

im tyring to make excel add one group of cells. but not like 5+5=10 but 5+5=2. confused yet i am. basicly i want it to only count the number of cells with numbers in it. im shipping boxes with differnt amounts in them. but i want to know how many boxs are shipping.

View 13 Replies View Related

Insert / Delete Rows

Jul 6, 2009

I'd like to create a variable list. If a number is entered into B7 (see attachement), I would like that number of rows being inserted below. Starting at A8. But I would like the list to be variable. So if a lower number is entered, the rows would be deleted. And I would be great if the formulas could be maintained.

View 5 Replies View Related

Insert And Delete Rows With VBA

Jun 6, 2014

I've a protected sheet with one table with 6 columns and 1 row (to be filled), and the column headers.

I want to allow the user that will fill the sheet to insert more rows with a button (+) I want also to allow him to delete the last row with a button (-), except the first row, because the table must have at least one row.

How can I do this with vba code?

View 1 Replies View Related

Insert Or Delete Row Using Macro

Oct 30, 2009

I have columns 1 to 5 that requires user input. At the beginning of first row, i have created two buttons +R to insert row and -R to delete row. I used macro recording to get this done. It works well but I need both buttons to be copied on for other rows as well. Let me re-explain, when a person clicks on +R in row 10 I need a new row inserted at row 11 which both the buttons +R and -R copied in. When a person clicks on -R at row 10, i want row 10 to be deleted. the first default should never be deleted. All rows should be added before statistic as statistic row will calculate all the inputs from user start to finish. Can this be done?

123456+R

-R
Statistic: PLS refer to this diagram

12345+R,- R

Statistic: ignore this diagram
I even tried http://www.mvps.org/dmcritchie/excel/insrtrow.htm but it is not working. I am not sure where I am doing wrong.

View 9 Replies View Related

Pivot Table Group :: Group By Integers And Not By Months, Years Etc?

Nov 12, 2009

I have date fields as column labels in a pivot table. When I try to group them I'm only given the option to group by integers and not by months, years etc.

I've had a look at the format settings of the column and they are formatted as date fields.

View 9 Replies View Related







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