Sum The Cells In B According To What The User Selects From The Drop Down
Oct 8, 2009
Say you have two columns, A & B. Each cell in column A consists of an identical drop-down menu of four possible choices. Each cell in B is a random number. I want to sum the cells in B according to what the user selects from the drop down in column A. If A1=A2="BILL", I want the sheet to add B1 and B2. IF A1=A3="BILL", and A2=A4=TOM, I want the sheet to sum B1 and B3, then sum A2 and A4. So, conceptually, I guess column A acts as a group identifier, and I want to sum B by group.
My worksheet with macros gets messed up when a user selects either multiple cells from column F or selects multiple cells in any one row (but only if column F is included) in the range C17:O116 and hits "delete". I will either do an exit sub, an application.redo, or something similar so that this doesn't happen, but I don't know how to write the code to trigger these events. So I need a way to determine "if the user selects multiple cells in column F and hits delete" or "if a user selects multiple cells in any row from 17 to 116 that includes the cell in row F, and hits "delete.""
Set Rng = Range("F17:F116") Set rng2 = Range("K17:K116") Set Rng3 = Range("L17:L116")
The code below adds the date to D:D once the user enters data in B:B and then adds the time when the user selects from a dropdown in C:C. When they have finished the task they enter anything into F:F and then it enters the end time in G:G.
This works well except for one flaw and one modification that I can't get to work. I have found that people retrospectively change the activity in C:C which causes the start time to change. I would like to avoid this hapenning if possible by putting some code in to stop this. Also I would like the times to be related to the push of a button on the sheet and therefore need different code.
Code: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count > 1 Then Exit Sub If Not Intersect(Target, Range("B2:B900")) Is Nothing Then With Target(1, 3) .Value = Date
I'm wondering if someone can help me with this. I am using the excel calendar control and trying to activate it when a user selects a specific cell "C3". I can get it to activate when I move off the cell, but it's not working when they click on the cell.
Sheet1 Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("C3")) Then Call OpenCalendar MsgBox "Calendar" End If End Sub
Userform2 (I have this code under here)...............................
I have a userform for inputting information to a spreadsheet using the code below. It works fine however if the user does not select a radio button to select a score its saving the rest without it. How can I ensure the user selects a score,,,, ob10, ob8, ob6, ob4, ob2, obna.
I have two combo boxes: One for entering the Year, and one for the month. I can produce a message if the user leaves either box blank but I want a message to apear it the user selects a year AND month less than the current year (iYear) and current month (iMonth). I therefore need an AND statement between the two criteria but i dont know how to do it.
'....First Checks the Comboboxes arent blank then below Checks a future month/year secection is chosen
ElseIf YearBox.Value = iYear & iMonthbox < iMonth Then MsgBox ("You may not enter Data before the current Month") Else '...... Run main code here
I have a project, i want to create a user form, basically i have a work book that contains dinner menu's on column A and ingredients in column b. I would like to create a user form that have a drop down box that would show all the possible menu's referencing my workbook sheet1 column A values. and by selecting a item, i would like to be able to show all ingredients needed, is there a way to do this?. I hope so, it would be so cool to do this.
I am making a user form so that others can enter their data into a database. In some of the fields I want to have a drop down list that will contain both all the options from a generic list, and any other items that have previously been entered into that field. For example I have a generic list of components but someone may feel that none of those listed describe their component so they will add a new one, I want this new one to then appear within the drop-down list for the next user,
I have two columns, Account Number and Account Type. I already use Data Validation on Account Number to make sure it is numeric and on Account Type to make sure the user picks from a drop-down list. I want it so that if a user inputs an account number, it forces the user to automatically pick from the drop-down menu in the account type column, otherwise post an error.
this is my first attemp at doing a "userform". I am looking for some help in creating a user form that enables users to choose items from drop down boxes, which shows next level drop down list items, then down to final drop down list with information based on first two choices. I've attached the sample file for reference.
Is there a way to do multiple case selects. For example if I have A3=2012 and A4=COMPANY NAME do this. I don't want to use if and for this because I have several company names in this list and think case would be easier. So far I have the following attached code but this pastespecial should only occur if the value of A3=2012 as well.
Code: Select Case Cells(i, 1).Value Case "COMPANY NAME" Range(Range("B" & i), Range("E" & i)).Copy Sheets("Abbott Label").Select Range("b45").PasteSpecial
i am trying to set up a data validation list for the user to select the options from the 'reason' column' but the input in the box would be the 'code' corresponding to the reason
i.e drop down list would show me the' reasons' but when selected it would input the 'Code' only
I have this code below which autofilters a range and selects the data i need, there is also a small offset part that leaves the active cell as the one in the top lef of the needed data. I also have the row count of the data in cell G1. What I need to do is something along the lines of:
Each month we receive an updated budget which includes info for every month of the budget year. I want the user to be able to select the column (which relates to a month) that they want to use for the analysis. I will use the data in this column only for analysis. How can I do that?
I have a worksheet with approx. 100 form checkboxes. The cell behind each box holds it's TRUE/FALSE condition, which is something I check for elsewhere on another worksheet.
I need one 'SELECT ALL' checkbox which, when selected, will 'check' every one of these 100 checkboxes (change their conditions to TRUE).
Ideally this would be done thru an excel formula, but I've looked everwhere and not found anything that will permit this.
i am trying to do something along the lines of. a For Next Loop that selects the cell N6 and inserts the formula.
$K$7*F6+$L$7 then fill down to the cell N754 then selects O6 and inserts the formula $K$8*F6+$L$8 then fill down to cell O754. repeating this until there are no more values in either the K or L column. in the attatched spreadsheet i have deleted the values from 50 something down to 754 but the idea is still the same.
so that each formula inserted keeps the cell from column K and L constant when filled down but F changes, then when the next column is used(ie. from column N to O), the next row in the K and L is used but F starts from F6 and changes as it is filled down again.
A list box selection works fine on my computer but on a friends Windows Vista PC the following happens:
Selecting items near the top of the list works fine. 1/4 of way down a mouse click on an item selects the Next item. 1/2 of the way down in the list, the mouse click on an item selects the one 2 or 3 further down, etc., etc.
For example, I have a master sheet that has a drop-down list of the months January and February, which have their own sheets. I am trying to populate the sales of the week 1, 2 ,3 ,4 in the master sheet based on the same data for the month chosen.
In the raw data, the 0s split up the data into different steps. I am trying to create a function that selects the data from the ABC column and puts it into new columns for each step. I.e:
New Columns with: 1 4 5 2 4 8
and 2 6 9 8 9 3 3 5 6
In the raw data files, there will be 10 steps, with a varying length of data.
I am trying to create a drop-down box in cells D21 and D22 which are dependent on each other. From my understanding this cannot be done in Data Validation. For example cell D21 is Route Number and D22 is Route name. If someone knows the Route Name they would select it from the drop-down, then cell D21 would fill in the Route Number. Similarly if they know the Route Number the Route Name would fill in.
I am able to have one dependent on the other using Data Validation and VLOOKUP, however not dependent on each other.
I have a drop down box that shows progress of a project. The options in the drop down box are 0%, 25%,50%,75% and "Completed" - I am wanting to make it so when i click the desired option in the drop down (say 25%) it makes 25% of the cell show green (or completed)...all the way to when I click "Completed" then it will make the cell 100% green. I am trying to show a percentage of something getting done by way of color.
In the example attachment on the weekly tab, you will see I have daily totals and a sum for weekly. On the summary tab I have the columns going down with a link to the weekly totals.
I have over 5 years of data in this format and don't want to link each cell in one sheet to another. If I drag and drop, obviously the weekly doesn't come down correctly.
Is there another way as I don't want to have to do this for over 250 weekly totals (and counting) manually.