I want to alert a user that he or she has typed in a text string that begins or ends with an apostrophe ' or begins or ends with a quotation mark " so that they can take corrective action in removing these characters. The reasons for this are superflous to this post but what I thought was a logical answer returns a formula error. Here's the scenario:-
A user enters a string of text in cell A1.
Cell B1 checks if the text, if any, in A1 begins or ends with a ' or a " and if it does, returns an "Error" message
The formula I've tried in B1 is =IF(OR(LEFT(A1,1)="'",LEFT(A1,1)=""",RIGHT(A1,1)="'",RIGHT(A1,1)=""")),"Error","Ok") but Excel will have none of it.
- In each row, pops up a Warning Dialog Box if the amount of letters in column "J" doesn't match the # defined in column "B"? - Preferably this would pop up the Dialog Box as soon as the error occurs (so it's always running)
Two Exceptions: - Does not look at Rows 1 & 2 - Does not look at Rows where column B = 0 or null
I'm going to be using a spreadsheet to keep track of where different people are at. So if Person 1 is in Room 3, I will stick a 3 in the box next to their name and then can look at the spreadsheet whenever I need and see what room they are in. When I'm deciding what room to put a person in, though, I need to be able to quickly glance at a list of Room #'s and see what one's are still available. So I have a bank of Room #'s in the spreadsheet....1,2,3, etc.
What I'd like, is some way to set this up so that when I put, for example, "3" in the cell next to "Person 1" the spreadsheet automatically removes "3" from the bank of available Room #'s and when I delete the "3" because the person has left, it adds "3" back to the bank of available Rooms.
I use excel for keeping a database of all the movies I have seen.
My problem is in regard to the value of characters. I sort my movies by default alphabetically and am wondering if there is any way to exclude the word 'The' from the sort. Traditionally when movies are sorted alphabetically, that word does not count, but obviously my problem is that excel is indeed including it.
There is also another problem regarding the value of characters. When I rate movies less than a '6' I would like to write it as "<6". The problem is that excel actually reads the "<" symbol as being of greater value than numbers and will put any movie rated "<6" at the top of the row when I sort largest to smallest. Is there any way to change the value of the "<" symbol so that my movies rated "<6" will be sorted below all my other rated movies?
I want to change the last 16 characters of a cell to bold and font color.
I have this code but doesn't work. make it a working one.
Private Sub CommandButton1_Click() Dim ctrRight As String ctrRight = Right(Sheets("Planning").Range("B35").Value, 16) MsgBox ctrRight Right(Sheets("Planning").Range("B35").Value, 16).Font.Color = RGB(51, 153, 102) Sheets("Planning").Range("B35").Font.Bold = True End Sub
I have several comboboxes on a userform that work fine as long as I use a whole number, but if I try to use a number with a decimal, I get a run time error 'invalid property'. what I'm doing wrong or if I have to change a property value in the combobox?
I have a very large file of data, over 500,000 rows, opening in one sheet in Excel is not an option with my current version. In each row I need to change the characters in positions 41-44 from whatever they current are, to '9999'. I'm sure there has to be a way I can do this using vba, does anyone have a sample snippet of code, or another post they can point me too?
In this file, I have a Work Summary worksheet in which I'm extracting some data from the other worksheets to "summarize" all jobs into one nice work summary log On Basis of Average of data from 3 other different sheets A,B,C
The following form works great to if onyl formula calling is applied
I am looking for a way to use VBA code to allow a combo box (form control) to change the data in a cell. For example: The combo box could contain Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. If the user selects Monday in the combo box, than cell A1 will populate the word Monday. In the particular situation that I using this for, an if statement will not work since there are 82 values (options) in the combo box.
I have a massive list of items, most of the same items have different detail depending on the item itself and/or region its being sold etc. I'm been using combo boxes to change regions giving the full range of items within that region but different prices etc.
The problem i'm having with combo box or even vlookup is I can only search or change details in rows (row number), and not able to figure out how to change details within a set of columns (vertically). I want to be able to select the region via combo box and change the details within a set of columns (top to bottom).
I have a piece of code attached to a combo box. When selected the code loops through 3, even 4 times for no apparent reason. Has anyone come across this before? The loop can start either after the final "end sub" or part way through (.clearcontents mainly) Have included the code just in case it is something obvious.
Private Sub cmbDI_GrowthBasis_Change() If UCase(Worksheets("Tables"). Range("GrowthNo")) = "NIL" Then Worksheets("Detail Inputs").Range("DI_GrowthRateTitle") = "" With Worksheets("Detail Inputs").Range("DI_GrowthRate") .ClearContents .Borders(xlEdgeLeft).LineStyle = xlNone .Borders(xlEdgeTop).LineStyle = xlNone .Borders(xlEdgeBottom).LineStyle = xlNone .Borders(xlEdgeRight).LineStyle = xlNone .Interior.ColorIndex = 15 .Locked = False End With Else Worksheets("Detail Inputs").Range("DI_GrowthRateTitle") = Worksheets("Tables").Range("GrowthNo") & " :" End If End Sub
I inherited a spreadsheet with a combox box, drop down list for user to select a project by name. The cell right below uses a lookup function to select the code listed with that project name from a list on a separate worksheet. When I edit the codes on the list used as the source for the lookup, the new code will appear as it should.
I want to edit the drop down list that appears in the combobox. I cannot find the source for the drop down list. Any ideas where/how to look for it?
At the moment when you click the macro botton on the sheets a calender shows and you can select the inspection done tab, this gives you a list to select witch then updates the selected task in the sheet.
How can i get this to allow single or multiple sections so that if more than one task is completed on the same date they could be updated all at once.
How to make it function able. Here are the details.I have a user form named UserForm1 in the user form I have a text box and combo box. Combobox is named as ComboBox1 and text box is named as TextBox1.
Along with the above 2 fields in form, I have 2 labels, Label2 & Label6.
TextBox1 contains date (which user can either type or chose form calendar), and ComboBox1 will have Employee ID that needs to be choose. Upon selecting both, my Label2 caption should have employee name & Label6 caption should have shift time.
By using formulas in excel I have employee name in Sheet2 cell b2 and shift time in Sheet2 cell b3. Upon change either in ComboBox1 or TextBox1, I want data in Sheet2 cell b2 be the caption of Labe2 and data in Sheet2 cell b3 be the caption of Labe6.
What is the code to get this done, if either of them is blank, then label caption should be blank.
I have attached an example set up with a user form I am building. I currently have the first combo box loading upon the initialize of the user form an from that I choose one of the product types and it gives me a list with all product names associated in the second combo box. Upon a change event in the second combo box I want to populate the 3rd Column with the count of how many of that Product type.
I have a couple different code set ups in the attached sheet and neither works.
The following code works fine, but when I put the code in an ActiveX Combobox Change Event it gives a run-time error 1004. ("Select Method of Range class failed")The error occurs on the following line
Code: Worksheets("SAVED").Range("A" & l).Select
Code: Dim l As Long Application.ScreenUpdating = False l = Application.WorksheetFunction.Match(Worksheets("DATA").Range("O34"), Worksheets("SAVED").Range("A1:A10000"), 0) Worksheets("SAVED").Activate 'ROSTER=== Worksheets("SAVED").Range("A" & l).Select Selection.Resize(1, 739).Offset(1, 2).Copy
I have a Line graph using this entire table as the source data. What I would like to do is only use part of the data based on what the dropdown cell specifies. For example, if it is set to "Q1", I would like just the 2012-01 and 2012-02 data to show in the graph. If its "Q2", I would like only 2013-03 and 2012-04 data to show in the graph.