I have a macro used to format data from a software export. The user exports data from another system, copies and pastes the values into my sheet. I have a macro set up to strip out unneccessary columns, format everything, etc. The problem I'm having is that people keep clicking the macro button multiple times, which deletes more columns, and strips useful data out. Is there a way to set up a flag in the macro to stop them from doing this?
Once the sheet is formatted, it types in "Imported ____" (where the blank is the current date and time). So I'm thinking that is the best option to flag the macro; if A1 contains Imported*, then prompt "don't touch that friggin button"....or something to that effect.
Here is the code I have:
Sub Formatting()
'
' Formatting Macro
' Macro recorded 3/27/2008 by mileskb
'
But when I try to put this into a cell using the value option, I get a run time error 13: Type Mismatch. No problems while im compiling it but it comes up only during execution
But I want the cell to not show #N/A when a value through vlookup is not found. Other formulas Iv tried are to use ISERROR with IF and also to store the formaula in a string and then put it into Range.Value but it still gives me a run time error 13.
I am using conditional formatting to highlight all cells where the value <> 0.00. It's working for 98.9% of the records, but for some reason, about 5 of the records with 0.00 are being highlighted for some reason. I've checked the field formats and they're the same as the other numbers.
I have a lot of data (regarding graffiti) in a table and all my formulas work well. But, because I sometimes make an error in two columns of data I sometimes get results that do not balance. I want to put in a conditional format (?Is there a better way?) that will highlight the error as I enter the data. Can you help please?
Using Excel 2003 (sp3) and no add ons. There are lots of identical rows, 5:400, making up a table. I will use row 10 as an example.
In column M there is a formula which may or may not give a visible result. (It's a measure of the number of days taken to clean the graffiti and will only hold a result if the job has been finished.) The result for "M10" will be a number between 0 and 5 90% of the time, but may creep up to 30. It may also leave the cell looking blank although the formula itself is still lurking out of sight.
A matching row of cells, O10:T10, have no formulas in them. I must manually enter a "w" or an "a" into ONE of these columns, depending on the graffiti location (Worthing or Adur) and property ownership (Columns for residential, commercial, council etc.)
So now the errors I need to flag up as I enter data are to ensure that M and O:T balance. There should always be a result in M if there is an entry somewhere in O:T and if there is an entry in M there must be an entry somewhere in O:T.
Sometimes I mistakenly put an entry in O:T even if there was no result in M. Sometimes there is a result in M and I fail to put an entry in O:T. I need to be alerted as this happens, if possible. It will save hours of trying to track down my data entry errors.
BUT, there is already one conditional format already in M. It highlights the cell if it goes over 5 days for cleaning. =ISNUMBER(M10)*(M10>5).
If you can help, thank you very much. I thank you, my wife thanks you for me not doing overtime trying to track down my errors, my boss's thank you for making me more efficient and other forum readers may thank you for helping them to improve their sheets.
I've been using conditional formatting for some times now, but this is the first time I have this problem..
I've using conditional formatting to display icon besides a sets of numbers/percentage. The condition is as follows:
--- >= 75, green --- >= 60, yellow --- < 60, red
When I used this for "number", it works flawlessly.
But when it comes to "percentage", disaster strikes.. I am getting a Yellow for 75%, and red for 60%.
Below is a screen shot that I did to illustrate the issues. The set of numbers on the left is OK. But the same set on the right, just in percentage, doesn't work well..
I can set a cell to format if its own cell contains an error, but is there a way to conditional format if the next cell over contains an error? For example, turn A1 red if B1 contains an error?
I have the following issue and hope someone can help:
I'm setting a conditional formatting formula in a range of about 2000 cells using VBA. The procedure works fine on my PC, but generates "runtime error 5" on all of my colleagues PC's. (We all use the same version of Excel 2003).
im making this macro code for my cell that will have a conditional formula but im always getting an error pop up message: TYPE MISMATCH.
here is my code
Sub ACCOUNTFINDERCODE() Dim LastRow5 As Long LastRow5 = Columns(7).Find("*", searchdirection:=xlPrevious).Row
If Sheets("working file").Range("g11:g" & LastRow5) = "F1212014000" Then Sheets("working file").Range("k11:k" & LastRow5) = "='Account LookupSheet'!R4C3" End If
If Sheets("working file").Range("g11:g" & LastRow5) = "F1212015000" Then Sheets("working file").Range("k11:k" & LastRow5) = "='Account LookupSheet'!R5C3" End If
Below is some code I am trying to run. What I would like to do is select a certain "data row" in the pivot, and apply some conditional formatting to that. It works just fine until I reach the .colorindex = 3 line. It says I'm getting an application/object defined. how to fix this? I'm on Excel 2007. This was fine on 2000!
pvtCurrent.PivotSelect "'% Dist'", xlDataAndLabel With Selection With .Interior .ColorIndex = 36 .Pattern = xlSolid .PatternColorIndex = xlAutomatic End With
With .FormatConditions.Add(xlCellValue, xlBetween, "0", "0.97") With .Font .Bold = True .ColorIndex = 3 End With End With End With
In column L on sheet1, I want the user to type in a number. That number will be the number of recommendations that need to be done.
Once "L" is populated I would like the user to be prompted to fill out -what the recommendation is -date in should be finished by corresponding to the number that was typed into "L" which would be listed onto a new sheet. So if the user typed in 3 - I should have 3 recommendations with dates.
On my new sheet, I would like "A" to match "A" from sheet1 for the first one only "B" would be the recommendation from the prompt "C" would be the date of that prompted recommendation
Is it possible to prompt the user for a specific row number to delete in a vba textbox? If yes, then the code would fire using a button. I have the worksheet protected and only want to unprotect through code to delete a specific row number, then protect it again.
I'm in search of a way to prevent people who use a spreadsheet of mine from screwing up formulas. I've hidden rows 10 and 12 in a spreadsheet. i have a TOTAL formula in a cell on row 13 that counts from 10-12. that way, when people insert rows, the total is always right. problem is, people somehow seem still screw it up.
I'm hoping there's a way for me to put a button on the sheet to insert rows. and when the button is pushed, be promted to enter a number of rows. then have it insert that many rows.
I've not used Input Box function before. When a user opens my workbook I want to check whether a named range ("Name") is blank and, if it is, to prompt the user to type their name in an Input Box which then returns that value to the named range. This is what I have tried but I don't think I am referring to the named range correctly,
Dim strName If IsNull("Name") Then strName = InputBox("Please enter your name", "Name Required", "1") Range("Name") = strName End If
I have created an addin that runs several macros. To enable the user to undo any changes, I keep a backup prior to them using any of the macros in the form of a worksheet named back00xx. I want a prompt to be displayed to the user to remove these backups at the closing or saving of the file. The problem is that as an addin, how do I get it to display this prompt as the open workbook is not part of the addin.
Could one have a looping routine that is checking every xx min/sec to check if the current workbook contains any sheets starting back00
Currently I have information that includes numerous distributors information on one sheet. The code below separates each distributors information into a new tab and a new workbook, names the workbook and saves it in the specified file path.
I am trying to figure out a way to use an InputBox to popup and ask the user where all the new workbooks will be saved at. Thus, avoiding the need to change the code each time you want the new workbooks saved in a different folder .....
After recording a macro that goes to last figure in data, how do I edit this to prompt for a new data value and enter it into 1st empty cell at end of data?
is there a way to make a macro that runs on startup and prompts with a yes/no question, if the user wants to multiply all new data values time 1.0825, and after having selected if they do or dont want to allow that, would it be possible to have the prompt minimize itself but still be present in case they decide to toggle that on/off?
My Excel File Name "eai.xls" ,when I Click The File , It Open The Sheet Name "menu" With The Inputbox Prompt:="put Your Id" When The User Put The True Id , It Will Show The Input Box Prompt:="your Password" . If The Password True Will Activate The Sheet Name "data" .and Hide All The Menu Bar.
If The Wrong Id Name Show The Msg.box "re Enter Your True Id " ,that Also For The Wrong Password In Which If User Put More Than 3 Times Wrong , Will Close The Workbook And Exit File.
The User Persons Allow 10 Person Id . Keep In The Table Of The Sheet Name " Id And Password" The Id No. Are In The A1:a10 Password No. Are In B1:b10 This Sheet Name Is Hide And Protect
I run a macro to open multiple workbooks and run a macro within those workbooks. All worked fine until a message/input box was included in the individual workbook macros [that I cannot change] to notify the single workbook user when the macro had successfully completed and prompts for an “ok” input.
Can I get my macro to ignore this prompt and not wait for an input – I am currently clicking “ok” everytime it comes up on screen. Have searched help and forum but nothing jumps out.
I have eventually got my Worksheet up and running but now im trying to make things a little easier to complete. The plan is when the Engineer is on site he has to open the Excel sheet to check the tests he has to complete and then mark the results. this is fine but for vaildation he has to sign everthing etc... i made it easier so they only had to fill in one box and it would complete the rest but this seems to get missed more often than not.
SOOO
i want a Screen to pop up when some one opens my excel that says Enter name and contact details. then they submit this which updates the spread sheet with this information and then the engineer can continue as normal.
Is there a way for VBA to prompt the user for a new selection?.
For exmaple,
Code: Sub BlankRow()
The reason I need this is because I am already in a macro and can not change selection on screen and I don't want to exit routine to make new selection (last line of code).
I attempted to copy the cells (which had formulas) from one workbook worksheet into another workbook worksheet. It didn't paste properly, so I deleted it and resolved to enter the formulas I needed manually one by one. The formulas reference values in other worksheets within the same workbook. The issue is, now, for some reason when I attempt to enter the formulas, I get an "Update Values" prompt and the formulas won't reference the sheets within the same workbook anymore. Is there a way to stop this prompt from appearing? and unlink the workbooks?
I am currently using the below to generate a message prompt. I have two questions that require assistance.
1. How can I furthur tweak it to show the value contains in the cell that correspond to the date?
For example in cell A2 contains date value; Cell B2 is the order number.
If the date in A2 matches today's date, the message prompt should carry Cell B2's value instead of B2 that is displayed as of below code.
2. Can I set the prompt date to be like 15 days after today's date?
Example: Today is 05/01. There will be a prompt if the date in cell A2 is 05/16.
Private Sub Workbook_Open() Dim r As Range, ff As String, msg As String With Sheets("Test") Set r = .Columns(1).Find(Date, , xlFormulas, xlWhole) If Not r Is Nothing Then ff = r.Address Do msg = msg & vbLf & r.Address(0, 0) Set r = .Columns(1).FindNext(r) Loop Until ff = r.Address End If End With MsgBox IIf(Len(msg), "Matches Found:" & msg, "No match found") End Sub
I have a macro that performs an operation on all Excel files in a given folder. The only problem I had was I couldn't walk away until it was done because the files themselves had macros that gave me a Yes/No prompt to recalculate.
I already have a calculate command in my macro so how can I override this command without physically selecting and clicking "No" with my mouse and without editing the macros that are already in the files (each unique and embedded in the individual worksheets). I cant edit each file because there are close to 300 of them.