Basically, in the "Thisworkbook" code , i have some code in the Workbook_BeforeClose section. Currently , it autosaves the workbook in a folder i have specified.
However, i need to add some code.I want to check that a certain cell has a value in it before the user closes the workbook, and if the cell is empty, show a messagebox asking him to enter a value.
I know how to get a messagebox to pop up, the only thing is once the user clicks the OK button, i need the rest of the code execution to pause, allowing him to make the change then if he clicks the "X" (top right of the screen) to close the file or application, the filesave dialog appears and he can then save the document.
how to go about this because at the moment when user clicks ok, the messagebox just disappears and filesave dialog appears and he doesn't have a chance to edit the cell.
I am looking to allow a user to enter a unique value when a drop down value is captured from a list i.e 'Other' (Possibly a pop up box), then I require this value to be hidden and calculated along with others to show the average (The average calculation obviously wouldn't be in the same cell).
I really know nothing about vba so here goes. I would like to enter data in a row with 4 cells of info. then hit enter and return to the first cell and move the row down. all four cells must have data entered. and all four must move down. i tried some code as below i found and i modified but it did not work as expected. this moved the row down when returning the cursor to A2. It also should not copy the data style of the top row.
Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Column <> 1 Then Exit Sub Application.EnableEvents = False
I'm building a spreadsheet that consolidates multiple worksheets into one. I've got that portion done, but what i need help with is a user prompt. I don't have an example at the moment, but it should be fairly straight forward.
Rather than consolidating all the data into one worksheet I want to consolidate only the rows that contain certain information. The column I need to query in each worksheet is "BL". The only thing is that column won't always contain the same data. Is there a way to do basically a prompt to where it searches for the data they want and if it isn't in there it just moves on to the next worksheet automatically?
I would like to create an spreadsheet that prompts me to input data into a cell (eg; 'C1' - 'Quantity Ordered') as soon as another cell on the same row becomes populated (eg; 'A1' - 'Item Code'). I need this function to apply for several rows (25 rows in total), so that if data is then entered into cell 'A2', I get a prompt to enter data into 'C2', all the way up to a prompt for data in cell 'C25' when cell 'A25' is populated.
As it is imperative that I never forget to populate the relevant cells; I would also like to 'enforce' the prompt - perhaps by preventing the worksheet from being saved until the relevant cells have had data entered into them, or perhaps by using some kind of form, rather than a messagebox.
My new Time in Motion sheet is coming along nicely with some snazzy programmed Command Buttons to fill data into another sheet.
One of my buttons is for 'other' tasks, so I'd like to programme a button to prompt first for a number of minutes (e.g. 30), and then a brief description (e.g. Meeting) and input the data side-by-side in 2 columns on sheet 2.
This is what I have for my other single-entry buttons, so what would I need to add?
Dim ans As String ans = InputBox("Case reference:", "Data Entry") Sheets("Sheet2").Range("F" & Sheets("Sheet2").Range("F" & Rows.Count).End(xlUp).Row + 1).Value = ans
I am looking to find a way and synthesize code that will prompt the user for text data when he/she clicks a radio button, then place that text data in a "Notes" worksheet within the same workbook. Given that there are multiple radio buttons, with options of "OK" and "attention needed" (it is a checklist of maintenance items), I also need to find a way to have each note listed sequentially in the notes worksheet. My questions: Is this possible using macros? Can you steer me in the right direction? (change event, inputbox, then what?)
I have a spreadsheet that runs a macro resulting in a different number of rows everytime the macro is run. Columns H, I & J are the only columns with currency in them. I would like a macro to find the bottom-most row of currency data in these columns and insert the Auto-sum formula in the row directly below each of these 3 columns. Then bold this row and increase the font by 2 points (or 12).
I've been using Excel for years and had very few issues. However, I recently went into a spreadsheet to update it and was unable to select and enter data into an individual cell. When I click on a cell and try to enter #s nothing happens (my num lock is on). Then when I try to click into another cell it just highlights that cell, along with any other that I move my cursor over. Once I click on one cell I can't stop the highlighting from happening. I can't even click on anything in the toolbar.
I have 13 columns - 12 representing each month of the year and then a total. I start in F15 with Jan and end in R15 with the total - this is the heading row.
Below that I have my numbers for each month. Here's what I need to do: Anytime the total changes (by updating the monthly numbers), I need the day's date to be automatically entered into F14. This way I know the last time the data was changed.
I have a developed a UserForm to enter data into Excel. I can get the UserForm to enter data in row2 under the headings I have created. I have a Next button on the UserForm, which I want to go to the next row when pressed to enter dta in row3, then row4 etc. Is there anywhere I can find examples of how to do this?
I have copied my first sheet into multiple sheets. Now when I enter data in one it shows up in all of them. How do I stop this from happening? I have cleared out any content in them and the formula bar is blank in every line.
- copies rows from one sheet into another sheet based on a set of criteria - the very very very first time the macro is run, the first row of data should be put into row 7 (formatting reasons) - however, every other time it's run it should paste into the next clear row.
But, what is happening is that, each time its run, it puts the data into row 7 => overwriting data.
I've used the offset and counter function but perhaps I need to put it in the header of the code to get it working?
Is there a way to add data into a cell that already had a formula? Lets say in cell A1 we have a formula like "=A1*A2". Would I be able to some how enter a value into cell A1 without changing the formula?
Example: enter value "5" into A2 and value "10" into A1 which would result in A1 value being "50" after value is entered.
I know that this creates a circular error but is there any other way to accomplish this?
I know I can put an IF formular into B1 =if(A1="sat",D/O,0) but obviously if people enter data to this cell i.e time they worked the formula goes is there anyway I can put a formular into C1 but have the result entered into B1?
I have an excel sheet with a few columns, Column (1) has data entered for ever row (with a name.) Column (2) has a few random cells with data (names) about 30% and the rest are left blank. What I need, is to have a formula in a new column (3) that will put in the the data (names) of column (2) and then if there isnt data in column (2) then it will put the Data (names) from column (1). (ps, If i cant get this figured out, we have to buy a custom interface and it will cost around $7000,)
I have designed a project sheet that shows Project,tasts,start & end dates, with cells being highlighted via conditional formatting using the between format, What i would like is for the macro that i recorded to enter the data(which is c/f to a new row, At present when i run macro it reruns on the same row,the filldwn method dosn't work either, For design layout i have based it on microsoft project
I have multiple sheets in a workbook. The sheets are protected as this workbook is used by other users also. I need to enter same data in column E of around 15 sheets. I select multiple sheets with ctrl+ or shft+click method and enter the data in the required cells. The problem is after selecting multiple worksheets, I'm not able to enter any text but I can enter numbers. When I remove the protection from all the sheets it is possible to enter either text or numbers.