As the title sugests I would like to Select a cell and a macro will highlight the row and column
Sub Select_Entire_Row() Dim RowNo As Integer Dim ColNo As Integer RowNo = Selection.Row ColNo = Selection.Column If RowNo.Value >= 1 Then Cells(RowNo, ColNo).EntireRow.Select ' I want it to do both not one then the other Cells(RowNo, ColNo).EntireColumn.Select End If
I came across this code that selects (and extends) cells between the active cell and the next cell with data.
Is it possible to modify this so that it selects the entire Rows ?
Code: Sub Test() If Selection.Select "" Then Range(Selection, Selection.End(xlDown)).Select Range(Selection, Selection.End(xlToRight)).Select Else Range(Selection, Selection.End(xlToRight)).Select End If End Sub
I've been working on a macro which delivers a daily report. the report is made up of 4 sections (received orders, scheduled orders, pending orders and unusual orders) each section is topped by a title which is a merge of all columns (A through I) the problem I am having is that the first column displays case numbers (to be displayed in text or number formats) and the 7th and 8th columns are dates When I try to have the VBA select the first column to format as a number, it will select all columns due to the merged cells is there a way to format only non-merged cells of a columns
This is the section I currently use for formatting but it doesn't actually work, (everything ends up in a date format)
i want information on my "Intra-op tab" to automatically populate on my "Tissue" tab. In Column "A" of my intra-op tab i enter case id's, 1 per row, and i would enter a date received under column "D". On my "Tissue" tab, i also enter those case id's under column "A" but i would have multiple rows of the same number. I want that whenever i type a specific case id on my "Tissue" tab, it will automatically fill in the date in column "T", the date that coincides with the case id in column "D" of my "Intra-op Kit" tab.
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:
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)..............................
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
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.
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?
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.
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
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
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.
I want to catch an error and reset the entire code to the very beginning and skip that entire entry. When I use "Next fieldSheetName" I get "Next without For," error 1004. Searches tell me I have an open block somewhere, but that's not true. Removing that statement (and having the loop iterate as normal) has no error at all.
Dim employeeName As String Dim fieldMax, x, y As Byte ' Counters mostly Dim workedHours, fieldSheetName As Integer
fieldMax = 204 ' Row number to stop on in the field time sheet row = 4 ' Row specification for field time sheet. Begin at row 4 to ignore headers ' and start on the first name. This should not be changed! Col = 3 ' Start at column 3 then increase by one to start going to next time entry
' RESET HERE! For fieldSheetName = 4 To fieldMax Step 8 ' This is our MAIN loop. It iterates from 0 to fieldMax, which is 204...........
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.
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.
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