VBA - To Border Cells With Entry In A Given Range

Feb 28, 2007

Using VBA how could I put a border around any cell that isn't empty within the range B1:C500. (Worksheet name - Floc BOM)

View 9 Replies


ADVERTISEMENT

Border Last Range Of Cells

Aug 3, 2008

I am trying to have a border drawn around a group of cells. This group of cells changes per list I make, but only the height changes. The width is always the same (from column A to column J) and the top is always at row 5. Only the last row changes. How can a border be drawn around this group of cells no matter the size of the group of cells? Below is the macro I have written so far.

Cells.Select
Cells.EntireColumn.AutoFit
ActiveWindow.SmallScroll ToRight:=7
Columns("K:N").Select
Selection.ClearContents
ActiveWindow.SmallScroll ToRight:=-7
Range("A2").Select
Rows("2:2").RowHeight = 49.5
lastrow1 = Range("A65536").End(xlUp).Select
Range("A5:J" & lastrow1).BorderAround.Weight = xlThin
lastrow2 = Cells(Cells.Rows.Count, "C").End(xlUp).Row
For I = lastrow2 To 2 Step -1..........................

View 2 Replies View Related

Bordering A Range (draw The Border For The Cells With In The Usedrange From Column A To BM)

Sep 21, 2009

I would like to draw the border for the cells with in the usedrange from column A to BM.

I have the below code, that I was using to border the column D alone.
When i change the range from "A:BM", i dont get the intended output.
Can somebody tell, what modification, I should do to get the desired output?

View 5 Replies View Related

VBA To Put Border Around A Range

Mar 15, 2013

I am after a bit of code which find a value in a cell "Grand Total" it may not be a the last row

Then finds the last column in the row and puts a border around the whole range.

View 4 Replies View Related

Creating Border For A Range Using R1C1

Mar 6, 2013

I'm trying to create a border for a range using R1C1 and get an error.

VB: Sheet11.Range(Cells(y, 1), Cells(y, 5)).BorderAround Weight:=xlThin

If I do not use R1C1 it works...

VB: Sheet11.Range("A18:E18").BorderAround Weight:=xlThin

View 2 Replies View Related

Border Around Range To Form Shape

Apr 12, 2008

For my university coursework I've created a comprehensive building cost model but I'm struggling with one aspect, copying the plotted ground floor footprint to enable floor finishes to be selected. A user can plot shapes in a 50x50 grid (B2:AY51). The shapes are displayed using conditional formatting. All shapes are conditionally formatted red, i.e. colour index 3. I wish to place a border around the plotted shapes, so that I can then copy the outline to a new tab. e.g. Range B2:AY51, If cell conditonally formatted red then place borders to the sides of the that cell that share a boundary with a non-conditonally formatted red cell.

View 3 Replies View Related

Border Around Cells With Same Value

Mar 23, 2006

Below a small example with the borders as they should be. How do i get a macro to put the borders automatically, depending on the similarity of the cells in column B ? Note the blanc column with the borders should be made automatically as well. Second problem: the minimum height of a "border" should be 34pixels as in the example so you can write something in there after printing the sheet.

View 9 Replies View Related

Conditional Formatting To Change Outside Border Of Range Only?

Oct 24, 2013

I'm trying to use conditional formatting to colour the border of a range of cells when another cell has data in it.

I can get it to color all the cells borders within that range when there's data in that cell but I just want the outside of the entire range.

View 4 Replies View Related

Copy Range In Another Sheet And Create Border

Feb 14, 2009

to copy column C and D, from row 3 to the end, from sheet2,in sheet1, column A and B, starting with row 2 and after that I need to create a border to the copied values and I need to create a border to the empty cell from column C.

open attached file

View 14 Replies View Related

Using VBA To Add Border To Bottom Of Certain Cells

Jul 19, 2012

I need to underline certain cells based on the value of a cell in this case from column "E". Right now I run a macro to look at the value in each cell in column "E". THe macro then adds a certain amount of blank rows below the that row. So, if cell E1 has a 4, my macro runs a calculation that says 4 divided by 3, +2. So it would add 3 blank rows under row 1. It does this all the way down my column of data.

Now it gets tricky. To the right of column E, I have 6 blank columns, F,G,H,I,J,K. F,H, and J are spacer rows with no data. I need them blank with out any borders. Columns G, I, and K are the columns that I am wanting to add borders on the bottom of the cells based on the value in column E.

I need code to look at the value in E1, in this case 4, and add borders to 4 cells, in this case G1, I1, and K1 and then G2. If the value would have been 5, I need I2, 6 would add a border to K2 and 7 would add a border to G3. Catch my drift?

So, every cell in column E will not have a value because of me adding blank rows. So when there is a value, I need to add borders starting on the same row the value is in. At most, there will only be 3 underlined cells per row because of the format. Once the top row is filled, I need to drop down to the very next row.

View 9 Replies View Related

Border Lines Are Not Showing For Some Cells?

Nov 7, 2005

I have an extensive spreadsheet with several columns and all showing borders where each cell/column begins and ends. However there are a few cells where the break with the next cell does not show the line.

I have highlighed the cell in question, gone to format/cell/borders and everything looks fine. Black color + format border shows square with all sides of square showing.

View 3 Replies View Related

How To Add Thin Style Border To Cells

Mar 2, 2012

I recorded this and I was wondering if there was a more simple way to add a thin style border to my cells?

'Insert BorderUnion(Range("K6", Cells(LastRow, "K")),
Range("B6", Cells(LastRow, "B"))).Select    
Selection.Borders(xlDiagonalDown).LineStyle = xlNone    
Selection.Borders(xlDiagonalUp).LineStyle = xlNone    

[Code] ......

View 3 Replies View Related

VBA To Add / Remove Border Around Merged Cells

Oct 5, 2012

I've got some VBA that adds and removes a border around a merged cell. I created it by recording a macro and it's pretty clunky. It needs to do this for 6 different merged cells, based on different events and takes around 5 seconds to complete. Not a major problem, but I was hoping that I could make it more efficient. Anyway, code below:

Adding the border:

Code:
Sub AddRAGBorderChart1()
'
' AddRAGBorderChart1 Macro
'
'
Range("D4:M15").Select

[code]....

Removing the border:

Code:
Sub RemoveRAGBorderChart1()
'
' RemoveRAGBorderChart1 Macro
'
'
Range("D4:M15").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone

[code]....

View 6 Replies View Related

Auto Copy Template On Record Entry & Link Set Cells Back New Record Entry Sheet

May 26, 2009

I am looking to create a macro that will create a new sheet when data is added on a summary sheet. Example.

1. Summary sheet called "Variations" contains columns that will contain the information needed for new sheet (Columns A to D)

2. When data is entered on "Variations" sheet: Column B, then macro automatically creates new sheet renamed to e.g. VO1 (Number used on "Variations" tab) and is a copy of "Master" tab.

3. Data entered in Column A to D on "Variations" tab is automatically entered onto new sheet created (e.g VO1). Shown is blue on attached file. Additional data is updated on "VO1" sheet and this then links back to "Variations" tab

View 6 Replies View Related

VBA - Putting A Border Around Cells That Arent Empty

Nov 3, 2008

I am trying to Put a border around cells that arent empty. Is this possible?

View 11 Replies View Related

VBA Code To Create Border Around Used Cells In Worksheet

Nov 20, 2013

I'm writing/recording a macro and would like some VBA code. I'm trying to make a border around all used cells in my sheet. When I use the macro there will be a variable number of used cells.

I'd like code that says:

If cell A2 has text then format cells A2:CL2 with an outline border Repeat for each row in the sheet until there there is no more text in column A.

Also, not sure if it matters, but I'm working on a mac.

View 9 Replies View Related

Double-Click Cell Border Jumps To Other Cells

Oct 23, 2008

I'm trying to double-click a cell to edit the contents, and I am off a few pixels, it treats the double-click as a double-click on the cell border, not the cell contents, and the focus jumps to another cell in the direction of the border instead of going into edit mode. The effect is as if I had pressed Ctrl and the arrow in the direction of the border I clicked on.

The only way I've found to disable this is to turn off the option "Enable fill handle and cell drag-and-drop", but unchecking that also disables actually useful things, like dragging the corner of a formula call to copy it down, etc.

Is there a good way to disable this cell jumping when I accidentally double-click a cell border?

View 9 Replies View Related

Excel 2003 :: VBA Macro - How To Prevent Cell Border Changes To Unprotected Cells

Aug 3, 2012

I have unprotected cells in excel where I need to change the content (number) and cell color, but I don't want the cell borders to change. I'm a beginner with vba. I've tried protect sheet and workbook options, but looks like I need a vba code and don't know where to start.

Win 7
Office 2007

View 4 Replies View Related

Find Last Entry In A Range

Sep 28, 2006

Example. I have a range of information on sheet 2 in cells A1:A25 that contains values that are text. Another range in B1:B25 that has numerical values. I would like to link the last value entered from those ranges to cell A1 & B1 on Sheet 1. Is there a formula option to do this?

View 5 Replies View Related

Allow Entry In Only One Cell Of A Range

Jun 29, 2007

I have created a very simple form. I want the user of my spreadsheet to fill in 1 cell in each section of the form, but they will have a choice of a couple of cells to fill in. For example, they can fill in one cell with the temperature in Fahrenheit or another cell with the temperature in Celsius. I want Excel to stop the user from putting data in more than one cell. (This way they can't put in a value for both boxes, which could confound their outcome.)

View 5 Replies View Related

Getting Entry In One Cell To Cause Entry In Another Based On Entry In 3rd

Mar 20, 2014

I have a percentage in R3.

If I make an entry in D13 then I want the R3 to be duplicated into C27 otherwise C27 should be 0.

View 4 Replies View Related

Using Cell Entry To Complete A Range

Sep 24, 2007

I have a formula that calculates the number of rows in a spreadsheet. I would like the results of that formula to complete a range description. For instance, if the range would be expressed as A1:A20 (for a file with 20 rows), and the result of the formula (the cell enty) for a different file is 35, I would want the range to be expressed as A1:Ax, where x is equivalent to the result of the formula (effectively A1:A35, but expressed with a reference to the cell with "35" in it, not the 35 itself).

View 9 Replies View Related

Dynamic Range Not Extending To Last Entry

Nov 24, 2009

I'm having a problem with a dynamic range. I've re-checked my formula at least 10X and its syntax is correct. The problem is the dynamic range stops short 3 rows up from the last entry.

View 9 Replies View Related

Add TextBox Entry To ComboBox Range

Oct 11, 2006

I have a user form that has a combobox, two textboxes, and a button on it. When the form is loaded, the combobox fills with data from a worksheet I created. THe worksheet has a column with the item names, and another column with the quanity of each item. The combobox is filled with the item names. SO far I have this done. My issue is that when the user selects an item from the combobox, and enters a quantity in to the first textbox, and then clicks the button, I want the quantity in the textbox to add to the quantity cell that the part number from the combobox references to. Then I want this new quantity to show in the cell and the second textbox.

View 3 Replies View Related

Stop Blanks In Entry Range

Nov 1, 2006

I have created a worksheet with different validation rules for different columns for users to enter data. Is there a way I can make it so each cell must be filled in? I don't want any blank cells. Is it possible to create some so that the user must fill in the cell before moving on to the next cell.

View 9 Replies View Related

Plotting Range Of Numbers As One Entry (min And Max Standards)

May 23, 2014

I want to plot a graph where our customers can compare their results against our standards. (line graph) This has been easy in the past but rather than just having a single value as the standard we now a range for each standard a minimum value and a maximum value. How can i get both the minimum value and the maximum value plotted on the chart? This would be two lines with the area between the standards shaded in. The customers could then plot their results to compare against our standards?

View 1 Replies View Related

ComboBox Add Entry To Named Range If Not In List

Feb 4, 2014

I am trying to work up a referral tracker for my wife's employer. I have Named Ranges on sheet 2, a running log on sheet 1. I also have a userform that is being populated from the ranges on sheet 2. I have the project mostly functional, except for a feature I would like to add in. I am interested in adding to the named range that is being accessed if the entry is not in list, via the combobox1 on the userform. Also, if possible, I would like the list to re-sort behind the scenes so the added entry is properly located in A-Z format for next time. After searching the web a bit, I found some code that might work with some tinkering, but currently I am having issues with it. Here is the bit I am trying to use.

[Code] ....

I have been getting 424 Object Errors and a few others as I continue to mess with this. I am also attaching the project if someone may see a better way of getting the task accomplished. The overall scope of this is to log all referral sources so monthly and yearly reports could be made.

Attached File : Copy of Referal Tracker.xlsm‎

View 3 Replies View Related

Writing Values To Range - First Entry Repeated

Jan 2, 2009

writing values to range - first entry repeated
I'm having trouble with this set of commands

View 4 Replies View Related

Excel 2010 :: How To Pick Last Entry In Range

Mar 19, 2013

I have to report Actual Headcount every month. Since I cannot add the Headcount numbers in the FY Column. What is the best possible forumula I can use to pick the last month's reported numbers into the FY Column.

For example.

I have 13 columns (A - M). Jan - Dec and the 13th column is the FY number.

This month, I am reporting March numbers in Column C

Column D through N (Apr through Dec) are emplty

I need Column N (FY number) to read Column C and enter the value from that cell.

similarly when I report April numbers in Column D next month, I want Column N to read April numbers and ignore the prior months.

I tried using the min/max function but since h/c fluctuate every month I could not use that. I could use an "if" statement and go back every column but that seems to be inefficient way to solving for this. Any thoughts?

BTW, I am using Excel 2010

View 4 Replies View Related

How To Ensure Cell Entry In A Range Is Always Unique

Jun 18, 2013

I have a range B1:B20. These cells are populated by the user and I want to ensure that no two entries are the same. Is there a way of presenting a dialog box that prompts the user to enter a different value if the value they are trying to enter is already entered somewhere in the range?

View 5 Replies View Related







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