I have a worksheet which will be sent out of our organisation to a supplier for them to complete, save and return to me. I have a number of cells in the worksheet which I want to be mandatory. ie if no information is entered in the cell they will get a warning when they attempt to save the file down but will be unable to save it without filling in the cell. I was also going to colour the cells to identify them as mandatory. The cells are in random positions on the worksheet and different worksheets sent to different suppliers may have a differing number of coloured cells.
Is there a way to have one macro which finds the coloured cells (red), checks that there is an entry in each cell . If it is, allows a save. If it is not populated, displays a warning and stops them saving the worksheet until it is populated and is useable for all worksheets regardless of how many red cells are on the sheet and the position of them? If so how would it look?
I have made a spreadsheets wherein all the cells where data are to be entered are coloured yellow.Some cells are mandatory (coloured Green)wherein user have to fill data compulsorily & some are optional (Coloured grey) Since the file is big and sheets are arond 28, I want to attach a buuton which will be assigned a macro to do the validation work.
The macro will search all yellow cells & green cells and if found any of those cell blank will change those colour to red and shall also show a list where the cells are merked red (List will be in a pop up manner, printable, and shall show the name of the sheets & cell address)
My requirement is something like this. I have a workbook where end-users can fill data and send it to our system. They might enter any rows of data, it can be just 1 or even 100. I want to force users to fill in values in few mandatory fields : columns in B,C,D,E. Now I need a VBA code that should throw a message when it finds that the value in cells B,C,D,E are blank.
Since I am not sure how many rows of data the user can fill, I dont know how to code in VBA the above scenario. I cant give a range as the total rows of input data is not available and static value.
I need to be able to have users complete a range of mandatory cells before they are able to close a workbook.
Foe example cells c5,c10,i11, i18,i22 i24,i26 etc etc need to have data in them before uses is allowed to save or close the workbook. I would like to have a message box prompt to alert them to the issue.
I need a macro that will check that the cells B1,C1,D1,E1 and one of the cells F1,G1,H1,I1 are filed out upon entry in A1.
If Not IsEmpty(.Range("A1")) Then If WorksheetFunction. CountA(.Range("B1,C1,D1,E1")) <> 4 Then MsgBox "All cells in row 1 are not filled out" Application.Goto .Range("A1:I1") Exit Sub
But how do I get it to also check that either F1 or G1 or H1 or I1 is also filled out. If possible I also would like it to beimpossible to add text in more then one of the cells F1:I1. Summary, upon entry in A1 I want cells B1:E1 plus one of the cells in F1:I1 to be mandatory, so in total there will be 5 mandaory cells.
I want the macro to check the rows 17 to 1000 if there is a value in column E on respective row. I have this, it works fine but I have to cupy it approx 1000times, that is for every row and then change the row 17 to 18 and 19 ...1000, There must be an easier way?
Sub Knapp174_Klicka() On Error Resume Next With Blad1 ' CodeName If Not IsEmpty(. Range("E17")) Then If WorksheetFunction. CountA(.Range("E17,J17,P17")) <> 3 Then MsgBox "Du har inte fyllt alla celler på rad 17" Application.Goto .Range("E17:P17") Exit Sub End If End If...........................
I'm working on some data dealing with time fields, and I need to have them counted in 15 minute intervals.
For example, one of the entries listed in a column has an event starting at 02:25:00 and ending at 02:55:00 (30 minutes). Along the top row are times listed in 15-minute intervals, e.g. 13:00:00, 13:15:00, 13:30:00, etc. In the corresponding cells, if the entry took place within a particular interval, I need it to say "1", otherwise have it say "0" or "-" or something denoting no event.
An IF statement was used, but it didn't seem to work.
If that's a little hard to follow, check the example attachment for a better idea of what I'm trying to describe.
In the example spreadsheet, Row 2 (manually typed in) is what I'm looking for. Row 3 is the (failed) attempt to use the IF statement.
I have a spreadsheet that is designed to aid a production department to complete and track their orders. I need two things from this.
1) I have an order of 500 baskets. Baskets are stacked, but the heights vary from 16 to 20. I need the spreadsheet to be able to work this out for me. Example: 500 baskets 20 high = 25 stacks. 500 baskets 16 high = 31 stacks and 4 baskets.
Excel would work the last equation out as 31.25. How can I get excel to use the remainder (in this case 0.25) to work out the required number of baskets?
2) Using the above, I need the sheet to fill out a certain area with information. So, if the order is 500 baskets at 20 high, I need 25 of the cells in the specific area to display the number 20. Likewise, if the order is 500 baskets at 16 high, I need 31 cells to display 16 and the remaining cell to show 4.
Got two columns one with group name and other with value. given below is the data which i have
Retail group25635012030Technology group24520520245Wholesale group24334024450 the green cells are blank , i want them to fill up by the group name i.e first four rows belong to retail group, so i want retail group to be filled in the blank cells upto technology group from thereon technology group to be filled in till whole sale group.
I have a sheet that has been created with a pivott table, and as such has a lot of blank cells in the description column, and I want to do a little macro to fill all of these. Basically, what I was thinking, was that the macro finds the last cell with data in it in column A. Then it moves up one cell and checks if its empty. If it is empty, then it copies the information from the cell immediatly below then moves up one and does it all again. If it is not empty then it just moves up one cell and does it all again.
What I would like to do is to take the name values in column B and fill that into the region of blank cells below. I know that a special cells function could probably do this paired with a looping structure. I'm new to VBA and am trying to learn it so that I can use it comfortably.
I am trying to use the below code to fill a combobox with unique values. It works great except I can't figure out a way to replace BLOCK 1 with BLOCK 2. I want to use BLOCK 2 to populate mgNames so that only specific values are filled into mgNames. Currently BLOCK 1 just fills mgNames with an entire range without any conditions. how I can get BLOCK 2 to work in the way i'm intending it to?
Code: Sub findNames() Dim mgNames As Variant Dim myCollection As New Collection
I have a userform and on it is a combo box with the weeks in each month in it. A user has to select a week to enter figures for and then enter the figures into text boxes on the same form. When the click submit (command button), based on what week they've already selected, my code will put the figures into the spreadsheet in the appropriate place.
Sub december1() Worksheets("Dec").Activate If Figures1.TextBox1.Value >= "1" Then Range("c16") = Figures1.TextBox1.Value If Figures1.TextBox2.Value >= "1" Then Range("c17") = Val(Figures1.TextBox2.Value) / 100# If Figures1.TextBox3.Value >= "1" Then Range("c18") = Figures1.TextBox3.Value If Figures1.TextBox4.Value >= "1" Then Range("c22") = Figures1.TextBox4.Value If Figures1.TextBox5.Value >= "1" Then Range("c23") = Figures1.TextBox5.Value If Figures1.TextBox6.Value >= "1" Then Range("c28") = Figures1.TextBox6.Value If Figures1.TextBox7.Value >= "1" Then Range("c29") = Val(Figures1.TextBox7.Value) / 100#...........................
Wasn't sure what the easy way to do this is. I'm trying to have a drop down menu where choosing a certain item triggers specific information to fill multiple cells. For instance, choosing Work Contacts in a drop down menu brings up four different people's names in cells B43-46 and their phone number in C43-46 and email in D43-46. Choosing another item for instance, Personal Contacts, would reveal a different set of four names and information.
I am currently streaming financial data into excel which updates on a minute by minute basis. Every minute a new row of data is automatically inputted based on market activity. Is there any formula/function which would expand to cover the new data as the amount of cells increases? Is there any way that I can have it so that the function/formula only looks at the last 20 or so cells, so its like a moving/rolling formula/function?
Starting to struggle a bit here. Trying to create a user form, with help from this website I was able to create 2 dropdown lists based on data validation and information from another sheet in the same workbook. I have one cell B7 that uses data validation and sheet "Eq List" to create a drop down list of departments that the user can select from. Once B7 is filled in, it creates the 2nd dropdown list in B9 so the user can pick "Equip Desc".
Where I am trying to fill B11 which should automatically give me back the Mach ID that is related to B7 & B9. Am I going about this the right way? I have ttached a sample file to make it easier to understand.
A/B/C/D/E/F/G/H/I/J/K April 2008 / August 2008/Jan/Feb/Mar/Apr/May/Jun/Jul/Aug/Sept/Oct....
How can I get excel to fill in a constant number say '3' automatically based on the date range in column A and B. For example, in this case Since the date range is from April to August how can I get excel to automatically fill in 3 for apr/may/jun/jul/aug
I have a column of data (Column T) which has about 10 different words in it (varieties of fruit). What I want to achieve is based on the data in column T I want to fill Column U with information, let me put it in an example.
Column T has the following words in 2000 rows. Thompson, Crimson, Sable, Superior, Midnight, Ralli.
If Cell T4 for example has 'Thompson' or 'Superior' I want cell U4 to say 'white', but if cell T4 has 'Crimson' or 'Ralli' I want it to say 'Red'. If it has Midnight I want it to say 'black'.
I think this can be done using a vlookup maybe? I don't have to go down 2000 rows to fill this information in.
I want to make things easier for myself when filling in my worksheets by having certain cells autofill based on a product number.
So I have my main worksheet and I have my product information sheet. When I type in the product number in cell 13C, I want it to auto fill cell 13B with the product name which is located in collumn A on the product info sheet, but dependent upon that product number. Collumn B in my product info sheet has all of the product numbers. From there I would need 13G on my main worksheet to fill in with Collumn D from the product sheet, but again dependent upon that product number.
There are more that need to fill yet, but I can figure out what to do once I have a starting point with the above I believe.
If I choose 1 thing from a list I want it to then fill in many cells with info.
For example: I have a color list to choose from, once I make my choice cells near it fill in with 1.5lbs yellow, 2lbs blue, 4lbs red,.....or what ever I have established as the "recipe" for my color choice. When I choose a different color from my list these cells each fill in with different values.
I have the following code attached to a userform. It works perfectly (for what I need) although I know it may not be perfectly written. However it does seem to take for ever to execute considering it's just filling some cells on different worksheets. Have I missed something out or got it tied up doing something that takes a long time. If it's just a fact of life that it takes this time then I can live with it.
Private Sub UserForm_Activate() Dim wsCB As Worksheet, wsLL As Worksheet, wsBond As Worksheet Dim rngFound As Range Set wsCB = Sheets("Current Bonds") Set wsLL = Sheets("Landlords") Set wsBond = Sheets("Bond") TenancyStartTxt = Format(TenancyStartTxt, "dd-mmm-yy") RnwlDteTx = Format(RnwlDteTx, "dd-mmm-yy") Application. ScreenUpdating = False 10 MyBond = Application.InputBox("Bond number for renewal?", "Bond Number") strFindMe = MyBond With wsCB Set rngData = .Range("c13:c490").......................
I have a spreadsheet which has several fields containing data and what i want to achieve is that when someone comes to close the spreadsheet , If they have not filled in all the fields required it will put up a notice to say that field **** must be completed.
There are some mandatory fields which need to be filled in by the user on the form - how can i flag these up at the end of the form - with a message box which says - "cant complete - feild "" "" "" are missing "
I have two combo boxes (created using the control toolbox), and I would like to have the second combo box (pricing analyst approval) be a mandatory field if the combo box value above it (Loss Type) is V-VII only. I would like to have some sort of promt appear that indicates that the Pricing Analyst combo box is mandatory.