Code For Range Borders (short)

Dec 4, 2009

This ia a recorded code to draw borders around cells on a given range

I am sure it can be shortened to 1-2 sentences!



Range("J11:O16").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic

View 9 Replies


ADVERTISEMENT

Writing VBA Code To Add Borders To Selection

Mar 4, 2008

I got some code from an old discussion thread


Sheets("Reference").Select
Range("d9").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select

Dim myBorders() As Variant, item As Variant
myBorders = Array(xlEdgeLeft, _
xlEdgeTop, _
xlEdgeBottom, _
xlEdgeRight, _
xlInsideVertical)

View 9 Replies View Related

VBA Code For Applying Borders To Ranges

Mar 12, 2009

I need to apply borders to a certain range. Is there anything I can do to shed some fat (code) off the macro below?

Range("A8:AD100").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)

View 6 Replies View Related

Macro Or VBA Code To Paste Short Responses At Cursor On Email Replies

Dec 13, 2013

Writing the code to assign a button so when I click it it types or pastes a short response on the body of a reply message or where I place the cursor.

View 5 Replies View Related

Borders Around All Cells In A Range

Nov 26, 2013

What I'm trying to do is put top&bottom borders on ALL cells in a range, not just the margins of the selected area. See spreadsheet below for explanation if required.

Surely there must be a way to do this through Excel menu, tools and whatever.

Alternatively, this could be solved if I knew how to select all rows in a spreadsheet (not Select All), because if I select rows one by one it will obviously apply the borders correctly. Is there a way to select multiple rows then?

View 5 Replies View Related

Dynamic Range Borders Via VBA

Aug 16, 2006

With Range("A12", Range("E65536").End(xlUp))
With .Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With .Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With .Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin......................

It is supposed to border data from columns A to E for all rows where data exists in column A. (like a dynamic range). How would I change the dynamic reference I have now?

View 5 Replies View Related

VBA For Adding Borders To A Range Based On Condition?

Jul 12, 2009

I have a spread sheet I use to track tools. One tool may be checked out / returned several times a week. When I do custom sorting I end up with the Tools listed neatly by date and number. EX: ...

View 10 Replies View Related

VBA To Apply Borders Around Every Cell In Selected Range

Oct 19, 2012

I'm looking for the least amount of code to apply a border around every cell in a selected range. The standard With Selection approach is to go through six times for the sides, top, bottom, and insides, which results in a lot of code.

I attempted a single code line approach (Selection.Borders.LineStyle = xlContinuous), but I cannot seem to influence the color or thickness of the line. I'm not looking for fancy here...standard xlThin in black color is all I need.

View 3 Replies View Related

Get Short Name API

Nov 17, 2008

I've been working with the getshortname() API, but have found that it has trouble handling strings that are already in short name format. I used a trim function to work around this. Now I find another problem; the API doesn't change paths with spaces in them. for example:

H:WCMGMTWC ProdBackup2

should return

H:WCMGMTWCPROD~1Backup2

Here is the
Private Declare Function GetShortPathName Lib "kernel32" Alias "GetShortPathNameA" (ByVal longPath As String, ByVal shortPath As String, ByVal shortBufferSize As Long) As Long

Private Sub Test()
Dim longPathName As String
longPathName = "H:WCMGMTWC ProdBackup2"
'
'Get the size of the string to pass to the string buffer.
Dim longPathLength As Long
longPathLength = Len(longPathName)
Dim shortPathName As String
shortPathName = Space$(longPathLength)..............................

View 9 Replies View Related

Short The Scrolls

Jan 1, 2009

When u open a new sheet the down scroll is limited to the screen size - very comfortably the scroll automatically increases its span as one uses more rows.

HOW DO I REVERSE IT?!?!

I had a 10K rows and I narrowed them to 100 (transpose). How can I shorten the scroll down ruler?

View 2 Replies View Related

Short Key / Hot Key For CommandButton?

Oct 3, 2011

One of my commandbuttons will every now and then be covered by the FormulaBar, is it possible to assign a short key/ hot key for its function (CTRL+q)?

CommandButton's code:
Private Sub CommandButton3_Click()
Select Case ActiveCell.Interior.ColorIndex
Case xlNone: ActiveCell.Interior.ColorIndex = 3
Case 3: ActiveCell.Interior.ColorIndex = 6
Case 6: ActiveCell.Interior.ColorIndex = 10
Case 10: ActiveCell.Interior.ColorIndex = xlNone
End Select
End Sub

View 7 Replies View Related

Short Cut Does Not Work

Jul 28, 2008

I wrote a little macro and put in into presonal workbook. I cant seem to get the short cut to work. When I got into " Tools > Macro > Macros > Options" and put in a letter that I want to use for short cut it does not work.

I am trying to run this macro in another workbook.

View 9 Replies View Related

Replacing Short Strings

Jul 28, 2008

I have a long list of locations in an excel spreadsheet, stating either the country (eg India) or for US locations the state (in a two letter format, eg NY). I need to change all the state location to say "USA". How can I do this, without doing 50 find and replaces? Can I do something based around the fact all the USA locations are two letters, whereas all the others are longer?

View 4 Replies View Related

Short Formula Instead Of Using Of CONCATENATE?

Apr 19, 2014

I am using CONCATENATE formula to make summary of my data, but i m using long CONCATENATE formula. I want to use short formula instead of CONCATENATE

formula is here :

[Code]....

How to short this formula and accuracy is first ...

View 7 Replies View Related

Short Number Strings

Jan 28, 2010

finding or developing a compressing technique, which can compress a 7 number string i.e., 11,10,1,2,10,7,5 down to 6 or 5 lossless, that would be amazing.

I already researched many compression technique; Huffman, Run-Length and LZ78 which all do well on large data sets and I only have a few numbers. If it helps by converting the numbers to binary for better compression then I what to known. I know that a solution could be impossible as we would know about it already but may be someone knows a trick to get rid of one digit.

View 14 Replies View Related

Short The Repeated List

Sep 15, 2008

I have a list of products more than 5000 positions (rows)
Some positions are repeated (It could be 1000 rows with "Pen" position)

Based on this I need to create new short list which will contain the list of ONLY UNIQUE positions.

The same function is: DATA - FILTER - ADVANCED FILTER - UNIQUE RECORD ONLY
It is only filter, but i need the same functionality for new short unique list

View 9 Replies View Related

Short Cuts In 2007

Feb 11, 2009

Loaded M/S Office 2007 on the puter, works well, can create shortcut to program but not to a file.
I followed the correct procedure but the shortcut will not work, I just end up with a blank screen.
If I go the long way around through excel -open-folder-file, yes it works but we do love our shortcuts don't we

View 9 Replies View Related

Toggle Grid Short Cut Key

Mar 9, 2009

This is to inform you that I frequently use toggle grid tool to make my worksheet white/plain,doing this with the help of mouse is eating lot of my time which i really feel anonying/pain.

I would like to have a short cut key for toggle grid which lies in Forms toolbar.

View 9 Replies View Related

Convert Path Name To Short

Jul 8, 2009

I've got a variable path for a file stored in a cell inside a worksheet that I need to convert to the old dos format (no spaces).

From c:Awesome FileFTPMy Awesome File.txt

to c:Awesom~1FTPMy~1.txt

The actual path/file name is much longer and is determined by multiple fillable fields, cells, and drop down menu's so the only feasible way at the moment seems to be that I need some code to convert the file/path name all at once.

After doing a little searching on google I came up with several that could determine the short path name of the actual workbook, but none that could convert a path that was different from the workbook.

View 9 Replies View Related

Short Cut Key To Select Entire Row

Jul 31, 2007

Is it possible to select entire row while Pressing Down Arrow Key from the key board.

View 2 Replies View Related

Short Cut Keys For Deleting A Particular Sheet

Oct 23, 2008

I want to know the Shortcut key for deleting a Particular sheet(s) from the excel workbook.

View 10 Replies View Related

Refresh Short Key In Pivot Table

Mar 18, 2014

For refreshing the Pivot table , we have to right click the mouse in pivot table and then click Refresh button.

Any short key for refreshing the pivot table after modifying the data?

like f2,f4, ctrl+s.

View 3 Replies View Related

Short UBN Automatic Email From Excel?

Sep 26, 2013

I work for a company that place consignment stock in hospitals. We can generate a report with short to expired products on it. I need a way to automaticly identify and send and email to the appropriate sales person to notify them that they have a product in a hospital that will expire.

View 3 Replies View Related

Summing Daily Total Over / Short

Nov 29, 2013

A
B
C
D
E
F

1
DATE
MANIFEST
P'work lbs
Scale lbs
over/short

2
1/1/2001
1
1000
1001
1 (formula)

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

I would like a formula to put in column F that will total the daily over/short.

I would like to place this formula in every row in Column F, but return empty "" if the next row is not empty, if however the next row is empty total the over/short column for the day. Keep in mind that a zero value in column E is not empty.

View 9 Replies View Related

Short List When Meet A Certain Criteria.

Oct 27, 2009

I need to extract key cell info from a master list when one of the cells meets a certain criteria.

Example:
Each row of the main sheet represents a Purchase Order with columns A-M each containing text, numeric, or currency values regarding that PO. Column F represents a 4-digit activity code that defines exactly what was purchased. If the activity code for a row is in the 1000 series (1000 -1099) I need to assign info from 3 other columns (say B, E, &G) to a subsequent sheet for tracking.

My limited Excel-o-vision has built this: (sheet 1 represented as FY10)
=IF(AND('FY10!F4>=1000,'FY10'!F4

View 9 Replies View Related

Creating Short Forms For Multiple Codes

Jul 18, 2014

I have to combine multiple line items to make one representative single code but for the life of me have not been able to find a way to do it effectively. I have attached a sample file.

Input:
Multiple Lot #, Code
Lot1, ABC123
Lot1, ABC124
Lot1, ABC145
Lot1, ABC147

Output:
Unique lot number, Single short code
Lot1 - ABC123,4,45,7

Single code.xlsx‎

View 7 Replies View Related

Create Short Key For Format Painter Tool

Jan 13, 2009

I am having one query regarding how to create short key for format painter tool. Request you do provide the procedure to get that for which I shall be thankful to you.

My mail id; - chakki_heera@yahoo.com; heera_chakki@yahoo.co.in

View 9 Replies View Related

Borders Around The Codes

Mar 22, 2007

I have a spreadsheet containing data in coloumns A to L.

Where all the codes in column B are the same then a border must be placed around all the codes that are the same i.e the border must start in Column A and end with column L.

provide me with the code the will put borders around the codes in column B that are the same ...

View 9 Replies View Related

Missing Borders

Oct 2, 2008

I have created a 4 page chart in landscape with text in each of the 4 columns in the chart.

When I looked at it in print preview the chart did not fill the page and so to widen the last 2 columns I dragged them over to the right hand margin. I am still definitely within the right hand dotted line showing the margin limit.

The problem is that I cannot now put a border line down the extreme right hand column. Every time I click on any of the border instructions in the Font tab nothin appears on the right hand side of the box.

View 9 Replies View Related

VBA For Shading And Borders

Feb 4, 2010

I am trying to write vba code that will highlight the row in the range if a field is over a certain percent. The column number won't change but the number of rows will. I'd also like the code to automatically work on all tabs of the workbook when a button is clicked.

Data Info:
Currently there are 4 tabs, but can have more/less
Columns used are A:O
Data for shading starts at A3 and should go to however many rows have data and ignore blank rows
Formula should be if data in column E is over 10.00% then the data in that row A:O should be shaded in the color off yellow & have black thin orders
If the data in column E is not over 10.00% then the data in that row should not be shaded but still have thin black borders.

View 9 Replies View Related







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