I am having an issue with converting what seems like Text to Dates. I am trying to group dates in my pivot table, but I keep getting the error "cannot group this selection". My dates are left justified, causing me to believe that they are text.
When I format the cells, however, the cells say that they are already in date format. When I try using Text to Columns in the Data Tab and selecting MDY, I get the error "You cannot move a pivot table table report or insert worksheet cells, rows, or columns."
Not sure what to do from here, as I would like to group dates by weeks.
I am trying to select a group of cells in an inactive worksheet from code in a module but I keep getting a run-time error 9 message and I cant seem to find the syntax problem.
I pasted my code below and the error occurs in the last line before the end sub statement.
I have code that opens a workbook then selects a range on a specific sheet. All the code works fine (the workbook opens, then the sheet is selected) up until it gets to:
Range("BM9").Select Then I get a run time error 1004
I'm working in a rather large (20meg) Excel file with multiple worksheets, references, formatting, etc.
Suddenly, when I attempt to Copy > Paste Special > Formats using more than a few cells at a time, I receive this error message...
"Selection is too large."
That's it - no reference, no nothing. Doesn't matter if I select a few cells, or entire rows, I get the same message everytime. However, I can copy-n-paste the entire 8000+ rows of data into a NEW file with no problems whatsoever. It handles everything - data, formatting, formulas, etc. But within my working file (same worksheet even) I get the error everytime.
I'm not using a macro. This file has worked fine for months. I'm doing absolutely nothing differently than ever before. This error literally just started today.
I know there is some issue with copy/paste of 8100+ non-contiguos cells, but I'm using contiguos cells. And again, I can copy nearly 10K entire rows of data and paste into a new workbook - just not within the same workbook and worksheet.
I've searched online - here, Mr.Excel, Microsoft, everywhere I can think of. Of all the problems I've found answers too, I have yet to find ANYTHING dealing with this problem - except in the context of a macro, which I am not using.
I want to add a msgbox with a no selection error to a multi select listbox I have. For a dropdown I just use "if .ListIndex =-1" but listindex doesn't seem to work. I'm playing with .selectedindex but it's not playing ball
I am trying to write VBA code that groups cells between blank rows and inserts a message if a string of text (a name) is missing from the entire group. I want the code to search cells in column A and group the cells between blank cells. Use the name I input in an input box as the search criteria and insert a message in the Column C next to the last blank cell in the group and then move on to the next group and highlight the cell in red with bold text. I am including a spreadsheet with an example of what the sheet should look like before and after the code is run.
I have date fields as column labels in a pivot table. When I try to group them I'm only given the option to group by integers and not by months, years etc.
I've had a look at the format settings of the column and they are formatted as date fields.
I have several groups of data in the same sheet. Each group has two blank rows above the first row of data. Each group has column "B" in common (e.g., "Phone" in the example attached). I'd like to add a title/label of "Phone" to the first column in the row immediately preceding the first row of data for that group.
how to use the group box to group a number of option buttons together.
Question is, lets say, i have a total of 4 group box. if i want it to work in such a way where by once 2 option buttons are being selected (1 option selected from each group box), the rest of the option buttons in the 4 group box will be greyed out. is that possible?
In Col X of the attachment, I have manually entered the count of the rows within each sub group, as determined by the counter in Col W. How can I do this automatically? I need this because when I filter the spread sheet by Rank, I need to know how many selections, of the filter Rank query, were in a sub group of ? number.
I'm trying to protect cells based on what's input in column E. Here's what I tried, but it doesn't work. It's giving me a "Type Mismatch" error on the word "Annuity" where it appears first.
I am having some trouble with a variable range selection within a regression. I keep getting an "application-defined or object-defined error." I've isolated each statement to find that the code that is causing the regression not to work is below (the error for that line of code states that the Select method of Range class failed):
I have this massive spreadsheet, with the maximum rows excel will fit on one sheet. In the interest of simplicity, this is what the raw data looks like:
Last First Amount
Jones Jim $1000 Jung Joe $700 White Jon $100 Jones Jim $200 Jones Jan $300 Jung Joe $800 White Jon $200
What I want to do is automatically get excel to group all the same names together. Then I want it to sum all the values for each name, then order by largest total value for each person, then order that by name alphabetically. In other words, the above would look like this after the sort:
Last First Amount Jung Joe $800 Jung Joe $700 Jones Jim $1000 Jones Jim $200 Jones Jan $300 White Jon $200 White Jon $100
Or, if necessary, there could be sum total rows under each name...although I don't have spare rows, so IDK. I could delete some rows if I had to, but would rather not.
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.
If a user selects certain options from a drop down list created by cell verification (from list), is it possible to display an input box and have the resulting input populate on another worksheet in the workbook? I have an attendance template I'm working with and if a user selects OT (Over Time) then a input box is displayed prompting for how many hours. The overtime is then tracked on another worksheet.
I tried very hard to design a leave roster for user to mark their leave application. The criteria are as follows:
1. 4 applications per date 2. a region of worksheet (i.e. "A2 to H20) will be defined for users to "click" on the cells (within the defined region) to mark their application. 3. once a cell is clicked (i.e. marked), it cannot be altered. 4. each click will automatically increase the total by 1.
I got the following code to deal with the situation but user can still click on any cell outside the region (in fact I fail to define the region).
Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim m ad = Mid(ActiveCell.Address, 2, 1) m = Range(ad & 24).Value 'here a formula "CountA(A2,A20)" will be place in the cell (24, c).......................
I have attached a portion of an excel file I am using at the moment. What I require is a piece of VBA code which will allow me to copy selected data based on a combo box selection. What needs to happen is this :-
If the selection in the "Index" worksheet combo box related to "Month" in cell G19 is for instance "December", I would like the macro to compare this cell value to the cell values in cells C96, C124, C152, C180, C209, C236, C263 and C290 in the "Tech Services" worksheet and where the values match.......copy the commentary (Range C126:Z147 in December's case) to the range C34:Z55.
I am working on a project where user has to select an item from a listbox, however there is a condition that if user select an item, other items of listbox should be disabled so that he/she can not select any other item.
I want to have a drop down list in a cell so that the value in the cell can be only selected from two columns of data. Additionally once the data from the first column has been selected I want to be able to limit the inputs the user can select from in the second column.
e.g. In cell C115 I want to have the value BDS05.
I want to be able to select the value BDS from a drop down list of values and once that value has been selected I want to be able select 05 from a list of values from 01 to 14 If I select BCS as the first value then I want the second set of values to be limited to 01 to 02 etc.
I have read about combo boxes and list boxes and I'm a bit confused about the best way to achieve this (or even if I can).
Private Sub Worksheet_SelectionChange(ByVal Target As Range) col = ActiveCell.Column Range("output") = ActiveCell.Offset(0, -(col - 4)).Value End Sub
In case it's not obvious, the macro places the value in the active row and 4th column of the worksheet into the range "output". The problem is, the worksheet is large and somewhat slow to recalculate. This macro forces a recalc on any selection change, but i only need it to run when the row selection changes, not the column. I'm sure there's a straightforward way to reprogram this.
I'm trying to build an investment calculator. Tried searching "calculator" as keyword but return nothing similiar.
There are eight cell : [ A ][ B ][ C ][ D ][ E ][ F ][ G ][h]
[ H ] is price of the leverage
[A] is X balance [b] is X lot size [C] is X amount of money use to get x lot [D] is X percentage of money use to get x lot [E] is X point gain [f] is X money gain [G] is balance + money gain
Ignore the formulae for leverage to determine 1 lot price. Take 1 lot = 250.
What I'm looking for is when I enter any value at cell B, C or D, it will automatically calculate the value for either B, C or D cell.
Let say, the balance is 10000.
If I enter 2 at cell B. Then, it will calculate the value for cell C & D.
If I enter 750 at cell C, then it will calculate value for cell B & D.
If I enter 25 at cell D, it will calculate value for cell B & C.
see attached example. I am trying to write an error detection routine that iterates through worksheets that have numeric values for names (ignore text names or alphanumeric). Macro checks range on each numeric worksheet E3:E33 and is supposed to report back on the SummarySheet if any value other than 1 or 0 is found in range E3:E33 on any numeric-name worksheet. Code as follows:
[Code] ....
Problem is that it just reports EVERY worksheet as having an error when clearly most don't (none do I think in the attached example).
Try changing some of ranges E3:E33 to values other than 1 or 0, it still reports all sheets. Why the macro does not evaluate the range E3:E33 properly and just reports every worksheet as having an error?
See the attached sheet. I am trying to add together two figs which are linked to calculations which have formula built in to stop error messages when there is a 0 / 0 = #value type error. However when these two cells are added, if the cells are blank I get an error message. And if only one cell has a value, I get "" with my existing formula. what I need to do to get a result of 7 if for example cell A4 = "" + B4 =7. At the moment my formula shows "" in the sum total of these cells
OK, so I have a userform with some text boxes that I have specially formatted to accept only date values in the form of mm/dd/yy. By default they are blank. I have a check in one of my codes that looks like this
Code: If DateBox vbNullString And DateValue(DateBox) > checkdate Then M1 = "NEOPRENE" & Chr(13) Else M1 = "" & Chr(13) End If
Where DateBox is this specially formatted TextBox and checkdate is a future date being checked against.So if DateBox has a value in it AND that value is greater than the date being checked against the returend string is Neoprene, otherwise it is blank.
Well the problem I have is when the first condition returns FALSE, i.e. when DateBox is empty, the DateValue half still gets evaluated and returns a type missmatch error or something like that because DateValue("") returns an error. I have line of code 8 times, one for Neoprene, squeegee, etc. So the name of the text boxes are each unique and I am using M1, M2, M3, etc.
For other reasons, use of "On Error Resume Next" doesn't work for this situation because it causes a result opposite to what I want to happen.
the if stattement works perfectly and does exactly what i want except when it comes to the else part. if there is no error the statements are run perfectly but if there is an error (in this case the error is generated when a match cannot be found in the spreadsheet) the else statement doesnt kick in and post the msgbox. the code just crashes. and returns an error 1004 on the line i have highlighted in yellow
res = WorksheetFunction.Match(invvar, Columns(1), 0) If Not IsError(res) Then
I am trying to run create a simple macro that copies and paste special values - something I have done 100's of times but for some reason I keep getting an error message - even though I recorded the macro and didnt write it by hand - see below:
Sub Macro6() Cells.Select selection.Copy selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False End Sub
For which I get 'Compile Error - Expected Function or Variable'