Group Selected Worksheets By Color

Jan 8, 2007

I would like to do is to sort only selected sheets. Can someone give me this additional code that can be incorporated in the code below. (If I just select the sheets I want sorted and run the code below, it sorts all worksheets irrespective of whether it is active or not).

Sub SortWorksheets()
Dim N As Integer
Dim M As Integer
Dim FirstWSToSort As Integer
Dim LastWSToSort As Integer
Dim SortDescending As Boolean
SortDescending = False
If ActiveWindow.SelectedSheets.Count = 1 Then
FirstWSToSort = 1
LastWSToSort = Worksheets.Count
Else
With ActiveWindow.SelectedSheets
For N = 2 To .Count ................

View 7 Replies


ADVERTISEMENT

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

Add A Textbox At The Current Position (selected Cell) With A Set Size, Fill Color, And Border Color

Nov 2, 2008

I'm trying to add a textbox at the current position (selected cell) with a set size, fill color, and border color. I found this: http://msdn.microsoft.com/en-us/libr...8(VS.80).aspx:

View 2 Replies View Related

Assign Same Value To Selected Cells Within The Same Group?

Jul 29, 2014

I have a table with 2 columns A & B and desired outcome in column C (see attached sample).

I need to assign the same value to cells (in column A) located within the same group (in column A) using the following rules:

If any cell value within the same group = W220 or W210 or E240 or E250, then assign value "Group A"

If any cell value within the same group = P210 or C100, then assign value "Group B"

If any cell value within the same group = N230 or N250, then assign value "Group C"

View 3 Replies View Related

Group Shapes In A Certain Selected Area

Jan 10, 2007

I don't think this is possible, but I thought I would ask.

I have buttons on a sheet.

Then I have drawings, that I make, using different shapes.

Instead of selecting all shapes on the sheet, I want to just select the shapes in a range say B17:F28 so I can group them.

View 9 Replies View Related

How To Have Only One Checkbox In A Group Of 3 Selected At A Time

Mar 23, 2008

I have a spreadsheet that consists for 30 rows of groups of three checkboxes on each row. I want to have only one checkbox per row checked at a time. If the user checks one box while another it already checked then I want that checbox to be unchecked.

I want checkboxes to work like groups of option buttons. Actually, option buttons would be fine but with option buttons there is always one clicked but I need them all clear until the user clicks one. They will start off clear but if the user clicks one by mistake there is no way that I know of to clear it again. Checkboxes will clear again if you click it again so I thought I would use them.

how to have a group of three option buttons or checkboxes that will begin unchecked and be able to uncheck all three is one is checked in error,

View 9 Replies View Related

VBA - Apply A Code To All Selected Sheets To Group

Feb 24, 2014

I would like to group some columns to all the sheets that I will have selected. Unfortunately the below code only apply the code to the sheet I am looking at.

Code:
Sub Group()
Dim ws As Worksheet

For Each ws In ActiveWorkbook.Worksheets
With ws.Range("F:Q").Group
End With
Next ws
End Sub

View 3 Replies View Related

Making Sure An Option Button Has Been Selected Within A Group Before Exiting Survey

Nov 26, 2009

I have a survey with different groups of Control Toolbox options buttons on it. I want to ensure that each question has an option button selected before the survey can be exited and emailed onwards. The grouped button names are: GroupA, Group1 through to Group6.

View 2 Replies View Related

Color Individual Lines Of Shape Group

Feb 3, 2008

The group behaves as one shape alright when, say, coloring the line, but is not "fillable". Below a simple sample. - The custom shape i am trying to color in is not a simple square or rectangle -not anything from the existing MS shapes that is....

View 6 Replies View Related

How Can I Group Worksheets On A Variable Key

Mar 31, 2009

I am using Excel 2007 with an extension from Adapx, Inc. of Seattle for electronic data capture and input.

I am trying to automate a process of inspecting and recording inspection data that has been collected and entered manually to this point. The data currently comes in as a variable quantity of 8.5 X 11 sheets. Some reports are 1 sheet; some are 7 or more sheets. In any case, the first sheet has all the ID information with some details and details of other samples are on subsequent sheets. When done manually, they are stapled together.

When done electronically, the report comes in as a series of worksheets. I describe the code I need as an electronic “staple” of a variable quantity of worksheets in Excel.

That is to say, I need to identify a group of worksheets as a single inspection report.

In order to make the plan work, I have the following idea. This is just my starting point. I am open to any ideas you care to share.

I need to have the current worksheet look at a specific cell in the previous work sheet.

If the value matches the value of the co-responding cell in the current work sheet, then copy the values of several specific cells into the current worksheet. This will repeat until the trigger value changes. It will increment by one. When it changes, I need to look at the next work sheet. If the trigger value matches the new trigger it will again copy the values from a specific set of cells of the current 'previous' worksheet into the then current work sheet. This sequence will repeat until there are no additional worksheets to process.

View 10 Replies View Related

Group On Multiple Worksheets

Dec 14, 2004

In an Excel Workbook with multiple worksheets set up exactly the same way, is there a way to select all sheets and perform "group and Outline" functions. I find that when I select all sheets, the "group and outline functons are not functional.

View 2 Replies View Related

Group/Outline Worksheets When Protected

Aug 20, 2008

I Need the outline/group feature to work on a protected workbook with over 200 sheets, meaning a macro to cover the entire workbook not just a single sheet. This macro should travel with the workbook as it will be on many different peoples PC's

Private Sub Workbook_Open()
Dim cSheet As Integer
Dim tSheet As Worksheet
On Error Resume Next
cSheet = 1
Set tSheet = Worksheets(cSheet)
While Err.Number = 0
Call wbProtect(tSheet)
cSheet = cSheet + 1
Set tSheet = Worksheets(cSheet)
Wend
Err.Number = 0
End Sub..........................

View 2 Replies View Related

Create Workbooks & Worksheets For Each Group In Table

Jan 17, 2008

I have a workbook that contains one worksheet with data. This data has 7 columns and is a database metadata report.

The columns are as follows:

Table
Joined Tables
Column Name
Column Alias
Column Description
Column Data Type
Column Length

From this data, I am looking to have a script that automates the creation of a new workbook for each unique value in the Table column (i.e. tablename.xls) and saves them to my local drive. Each workbook then would have x number of worksheets named joined table 1, joined table 2, etc that relate to the name of the table in the original Table column. Finally, each worksheet will contain the related Column data for each Joined Table as mentioned above.

View 9 Replies View Related

Retain Use Of Group/Outline On Protected Sheets/Worksheets

Oct 5, 2006

I have a sheet that I protect but i use the below code so that I can still use my gouping '+' or '-' symbols to hide/unhide rows.

ws.Protect Password:="PASSWORD", userinterfaceonly:=True
ws.EnableOutlining = True

This is ok but When close the workbook and reopen it, my sheet becomes fully protected and i cant use the group icons. Can anyone either suggest better code or a way to initilise the workbook to act in this way when it loads up. For Reference Below is my full

Sub ProtectAll()
Dim ws As Worksheet
sSheet = Control.Name
For Each ws In ThisWorkbook.Worksheets
Select Case ws.Name
Case sSheet1
Case Else
ws.Protect Password:="PASSWORD", userinterfaceonly:=True
ws.EnableOutlining = True
End Select
Next ws
End Sub

View 2 Replies View Related

Create Individual Worksheets For Each Related Group Of Table Range

May 25, 2008

I have a huge worksheet containing Blackberries expenses of my company divided by multiple sections. Each section follows the following pattern: Example:

Client 222-5555 MY COMPANY NAME LCC
International Calls
- Call to Bahamas on June - $50,00
Local Calls
- Call to NY on June - $ 30,00
Total Price - 80,00

I would like to select each row between client and total price and paste then on multiple sheets in order to create individual invoices. The selection must be based on the client number (for instance 222-5555) that is part of the cell value.

View 4 Replies View Related

Sum By Color And By Selected Text

Apr 5, 2012

I have code to sum by color and for color index. However I want to sum by color if a cell is green for instance and the cell to the left = the word "Month". Is there a way to do this? Using sumifs or nested ifs?

View 3 Replies View Related

Color Selected Cells

Feb 16, 2008

When you are on a spreadsheet and you use the arrow keys on the keyboard to move from one cell to another and you can see the cell you are on because of the lines, is there a way to have the color of those lines a different color than black? I would like to be able to arrow from one cell to another and have the lines be red or green so that I can see easier which cell I am actually on. Sometimes it can be hard to see which cell you are. Even if I could make those lines bolder to show up clearer which cell I am on.

View 9 Replies View Related

Vba To Change Color Of Selected Cell

Feb 5, 2008

As an example:

Cells C7:F7 are currently shaded light green. Cells G7:L7 are shaded light blue. M7 is shaded dark blue. N7:Q7 are shaded light yellow and R7:T7 are shaded light gray.

When any cell in that range (C7:T7) is clicked (selected), I want the cell color to change to it's normal color; like light yellow to yellow, light blue to blue, dark blue to blue, light green to green and finally light gray to gray.

These cells represent headings for a database. When a heading is selected, the database will sort by that column and the header will change colors. I can do the sort code.

If another header is chosen, the previous selection will need to revert back to it's lighter color and the new selection will change as above... so only ONE cell will be changed from it's "normal state" color at a time. This will serve as an indicator as to which column is being used for the sort. To the user, it will have the appearance of switching on and off.

If any other cell on the sheet is selected, then this should not trigger an event change.

View 9 Replies View Related

Change Color Of Row When Cell Is Selected

May 22, 2007

I have a spreadsheet containing many rows of data that I need people to review. After reviewing the data in the column, a reviewer must enter comments in the right-most column and then hit the Enter key to move to the next row down.

What I'd like to happen -- As a reviewer selects the cell where they need to enter data, I want the entire row to highlight. I can use conditional formatting to change the color of the row once data is entered, but I want to change the color of the row when a specific cell is selected. I've attached a sample spreadsheet.

View 4 Replies View Related

Change Color Cells In Range Selected?

Aug 28, 2013

[URL] and how I could modify the conditional formatting/vba to return the same effect but for a selected range, not just a cell?

View 2 Replies View Related

Worksheet Cell Automatically Highlights In Different Color When It Is Selected

Mar 6, 2013

I occasionally give presentations with Excel and would like to make it easier for the audience to see a particular cell when I move to it. The cursor can be tiny, and some people have a hard time seeing the cursor, so I use the keyboard to navigate to the cells I talk about. Yet, the cell, which then has a border around it, still can be hard to see.

Is there a way in Excel to have a cell that is highlighted, that is I move to a cell with the keyboard, so that it pops out in a different font color or background or format, when I move to it, and it automatically reverts to its usual format and color when I move away from it?

View 1 Replies View Related

Changing Color Of Selected Range Of Cells Using Macro

Jun 17, 2013

I'm trying to create a macro that will change the color of the cells I've selected to green. My selection will vary depending on what cells I'm trying to color green (not a fixed range). My current code only changes one cell of my selected range:

Sub IN_PCA()
'
' IN_PCA Macro
'
'
ActiveCell.Select
Range("M243").Activate
With Selection.Interior

[Code] .......

I've tried using "ActiveRange" in lieu of "ActiveCell" as well as other commands that would seem to be correct but have failed.

View 3 Replies View Related

Extracting Selected Data Into New Worksheets

Jul 15, 2009

I have a workbook, see attached example, which has multiple columns. I want to extract the data for a certain criteria, in this example column E "product".

I then want to take all of the data in columns A to L for the chosen criteria e.g. product 1696 and place it in a new worksheet. I want to do this for every unique product. The example I have given only shows 2 products and limited rows, in reality I could have 50-60 products with hundreds of rows per product.

View 5 Replies View Related

Copy Data From Selected Worksheets Only?

Nov 6, 2013

I am trying to work out how to copy all data from worksheets that begin with the name 'Sheet' and paste that information onto the next available blank cell in a workbook called 'Results'. I have found how to copy information from all worksheets to 'Results' but not from selected worksheets that begin with the name 'Sheet'.

View 6 Replies View Related

Viewing And Printing Selected Worksheets - VBA

Sep 3, 2009

I have a workbook containing a number of spreadsheets. Some of the spreadsheets are user inputs. The results of the user inputs drive a number of final reports. The final reports (i.e. spreadsheets) are hidden from the user (I don't want the user to be overwhelmed with so many tabs when they open the excel spreadsheet).

I created on the main input tab spreadsheet the following:

1. Check boxes - so that user can select after making his/her inputs the reports that he/she wants to view or print.

Say there are 4 reports (call them Sheet1, Sheet2, Sheet3, Sheet4 - therefore, 4 check boxes. Through the Format Control, the checkboxes have cell links that yield TRUE (if selected) or FALSE if not selected - linked to cells A1, A2, A3, A4 respectively.

2. Option buttons - one for view and another one for print. Through the Format Control, the View and Print option buttons have cell links to cell A5 yielding 1 for View and 2 for Print.

3. Command button - that will clear the check boxes

Issue
I would like to know if there is a way to code in VBA to:

1. Unhide the spreadsheets corresponding to the check boxes if selected;

2. Print the spreadsheets corresponding to the check boxes if selected for printing; and

3. Clear the checked boxes to unchecked if the Command button is clicked.

I'm struggling with coding to perform the above tasks.

View 9 Replies View Related

Count The Number Of Selected Worksheets

Aug 4, 2006

How can I count the number of selected worksheets in VBA? I've been looking in the Excel object model, but with no avail. Perhaps I'm overlooking something simple.

View 2 Replies View Related

Copy Selected/Chosen Worksheets Into 1

May 21, 2008

I am setting up a macro where the user opens their chosen file & their chosen worksheet which gets renamed & entered into my workbook. I can get them to open a workbook but I am having problems with the user being able to choose a worksheet and copy it over.

View 4 Replies View Related

Keeping Only Selected Rows Over Multiple Worksheets

Nov 29, 2013

I have an excel file with over 20 worksheets and each of them have around 1200 rows. The first column in each worksheet contains the variable names and then the data associated to it is present horizontally.

I only want to keep around 80 rows from those 1200 rows. They are not in sequence (means they are not in continuous order) so I manually selected those rows by deleting the non required rows step by step.

I did it manually on 2 worksheets but I don't want to do that manually over 20 worksheets. Is there any method that can speedup the whole process.

I am attaching the snapshots of the worksheets..

This one is before I deleted the unwanted rows.

This one is after the deletion of unwanted rows.

View 3 Replies View Related

Saving Multiple Selected Worksheets From Listbox As PDF

Jun 25, 2014

To this point I have been able to successfully write code that will save a constant set of worksheets as a pdf. However, I would now like to alter it to be able to dynamically select the desired worksheets from a list box (I have been able to populate my list box) and then save as a pdf. The last step is where I am have issues. This is what I have thus far..

Dim relativePath As String
Dim Selected As Long

For Selected = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(Selected) = True Then
Sheets("Summary").Range("Q65536").End(xlUp)(2, 1) = ListBox1.List(Selected)
ListBox1.Selected(Selected) = False

[Code] ..........

View 6 Replies View Related

Convert Selected Range On All Worksheets To Values

Aug 9, 2007

I have a macro that changes user selection from formulas to values:

Dim vCol As Variant

vCol = Application.InputBox("Select Column", Type:=2)
If vCol = False Or vCol = "" Then Exit Sub
Set UserRange = Range(vCol & "9:" & vCol & "35")
UserRange.Value = UserRange.Value

End Sub

I have several workbooks that use this macro, and the workbooks can include several sheets.

Is there's an easy way to change the macro so the user selection is changed in all sheets in the workbook. E.g. if the user selection is column H, the formula is changed to values in all sheets in the workbook.

View 4 Replies View Related







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