I have attched a spreadsheet to try to illustrate that task I am trying to complete.
In the original data "HANDSET MODEL" in cell D3 contains 3 handset models separated by underscores. I would like to enumerate these so that each handset model has its own row(the underscores will not be needed in the final version). All other data in that row stays the same(cells A3,B3,C3,E3)
Once this has been done I need the macro to move down to the next row and enumerate the handsets in cell D4, on this occassion thare are four handset and the number will vary from row to row. The macro would need to be able to cope with a variable number of rows for the original data and variable amount of handsets in the D column.
I have this macro it save to specific location but if the file name exist then macro fails or wants to overwrite existing file I will like to make this macro to add a number
So It will look like this DISCONNECTED # 11-09-09.xlsx DISCONNECTED # 11-09-09 2.xlsx DISCONNECTED # 11-09-09 3.xlsx DISCONNECTED # 11-09-09 4.xlsx DISCONNECTED # 11-09-09 5.xlsx
Been racking brain, searching through the forum here, and my Excel 2003 Bible all day trying to figure out this problem to no avail. I would like to clear the contents of any cell in a given range if the cell immediately to the right of is formatted as bold.
Basically lets say I have in cell A1 to A10 floor access data i.e. Users who used their ID cards to access a room.
Now the data always starts with either Rejected or Admitted then the user's name and then the card number and the access floor etc. the card currently has.
What I am looking for is that the macro should first check if the cell has Rejected or Admitted written in it - this I can do myself using =Left(A1,8) which should give me the helper column I need.
Then based on this I want it to only copy the name of the individual i.e. it should look in the cell and only copy whatever is written between "Rejected" and "(Card". The cell data is something like this:
Rejected Doe, John (Card #123456) at ABC 123 Floor1/Floor2/Floor3/Floor4 Door 1 [In] [Clearance]
I need to query a column and find the cells that have been incorrectly coded. For example the coding standard is #<reference number>/. Sometimes people forget the "/". It is not as easy as using search and replace because the string may have more contents than the above.
For example it may show: ATM/45678/#789876 dt. 1-2-14/ or it something like CHQ/44384/#78987600.
There are many permutations. So I need to find the cells that don't have a "/" following the #<reference number>, then allow a user to enter the slash. At this stage, I don't need code to find cells containing errors, I think I can figure that out. I do need to know how to allow the user to edit the cell as part of the macro. Once the user corrects the error, the macro should then continue. Is this possible?
how would I go about having a button on my worksheet which is clicked will open up Internet Explorer and search the information located in a specific cell?
I want to have a macro that will look at a few cells say A1 & A2 and then use the contents of the cells say 1Q07 & 2Q07 respectively to do a find and replace find 1Q07 and replace it with 2Q07. I want it to use the contents of the cell and not just the text because the contents of the cell will change each time used. I tride to do it here but I dont have it yet. It doesnt seem to pass the value to the variable and the variable doesnt seem to do the find and replace.
Private Sub Update_Click()
Application. ScreenUpdating = False Dim quarter As String quarter = CStr(txtquarter.Text) txtquarter.Text = CStr(quarter)
Sheets("Income Statement").Select Dim oneq As Single Dim twoq As Single Dim threeq As Single Dim fourq As Single Dim fiveq As Single
Userform that people use. I need validating the users input into the form.
1. Need to validate that A1 only has 3 letters (Alpha) 2. Need to validate that A2 is not left blank 3. Need to validate A3 has only 10 digits
My state is that when the user hits the submit button in the user form the macro checks for these validations above and if everything is ok emails the sheet. However if the user havent inputed the data correctly a msg box will pop to let them know what is wrong. If thats the case i do not want the sheet emailed. below is the email code i'm using
HTML Code:Â
Sub SendMail() ' Copy the sheet(1) ThisWorkbook.Sheets(1).Copy ' Send Email .SendMail Recipients:=Array("email.address@email.com"), Subject:="Test" & Format(Date, "dd/mmm/yy") .Close SaveChanges:=False End With End Sub
I'm attempting to create something that can be used on any workbook open to automatically open a file based on the data in cell.
1) User right clicks on a cell. 2) If the cell's value matches an expected format (##-A-####-## for example), a macro is available in the rightclick popup menu. 3) The user selects the macro in the popup menu if they want to run it. 4) The macro takes the cell value and converts it into a filename. 5) The specified file is opened in an external program.
I am trying to create a macro that will open certain files based on the contents of a cell. There are three possible files that I will want to open.
File1.xlsx File2.xlsx File3.xlsx
If the contents of cell Q2 = 10, 20, 30, 40 or 50 then open "File1.xlsx" If the contents of cell Q2 = 60, 70 or 80 then open "File2.xlsx" If the contents od cell Q2 = 90, 100, or 110 then open "File3.xlsx"
If the contents of Q2 do not equal any of the possibilities listed then I would like an error box to show with the option to end or debug the code.
I'm trying to create macro that will clear the contents of the cells in the 4 columns to the left of a cell that = 0 %, as well as the cell that = 0%. For example, if cell F13 = 0 % then the contents of B13:F13 would need to be cleared. The range in which data is being pasted into is B13:F27.
I have a spreadsheet that has a subtotal row after each data grouping. I need help with a macro that will go to column C, look for any cells with the word "Subtotals" in it, and format that row based on another macro I already have set up. I've tried about 50 different types of macros that I found out on the web, but none have worked.
Can a macro rename Excel files based on a cell's contents? The problem maybe that I download these files en masse from a website and they all have 54-character long randomly generated filenames which I can rename by selecting all and then use the rename function to get a series of filenames like a, a(2), a(3), ... but I would rather have the files renamed based on the text that exists in cell B1 which is the title of the report. I also read somewhere that this kind of macro only works if the tabs have names like "Sheet 1"
I thought this was a pretty simple formula but I am having difficulty creating it. I am attaching a little test spreadsheet. Sheet 1 is where the data will be entered. The Reimbursed column has a drop down choice of yes or no. The next 2 columns are the cost of registration and the cost of accommodations. On sheet 2 is where I would like the formulas. So in cell A4 I would like a formula that says if B3 on sheet 1 is Yes populate this cell with the contents of Cell C3 only, B4 of sheet 2 would then be B3 if A3 on sheet 3 is Yes and so on with the Not reinbursed if sheet 1 the Reimbursed column is no.
I have the following columns that return cover period dates.
Start of Cover PeriodEnd of Cover Period01-Nov-0631-Jan-0701-Jul-0831-May-0901-Dec-0930-Jun-1001-Jan-1131-Dec-10
I however need a macro that will delete the cell contents if the "Start of Cover Period" (column AK) date is > than the "End of cover period" (column AL) date.
Thus it must compare ak2 with al2 and if ak2>al2 then clear both cells. if AK2
I have a macro that runs with worksheet_change if I delete a cell. It does not run if I just clear contents. Is it possible to have the macro run when I clear contents of a cell?
I'm trying to figure out code to have only the contents of cell 'a2' cleared when the contents of cell 'a1' is changed. The issue is that both cells are derived from lists and I don't want the formats cleared.
I need code for a macro that will find a min value in a particular column and based on that min value clear the contents of other cells for that min value.
For example, I have dates in column E such as:
200907 200906 200902 200809 200803 200710 200707
Therefore, I need to find all records for 200707 and clear the contents in other cells.
I can't hardcode the min date because that can change from month to month when new files are created. As can the number of rows.
I have a protected worksheet in which certain calculations are performed based on certain inputs.
For example, let's take Column E:
Starting in cell E4, I have cells in that column which are input cells and further down the column are calculated cells which are locked and whose formulas are hidden.
I was looking for a macro which would go down col E and clear contents of all unlocked cells without messing up any of the protected cells.
Also, there are certain cells in which I want to clear contents and some cells that I want the macro to insert a "0" value.
I am just getting started and have over 1000 items in the list. I want to be able to run a macro that would take the root portion of the image link and then replace the 'imagename.jpg' with 'modelnumber.jpg'
So start with Column 1 www.photobucket.com/a/aa/a/imagename.jpg Column 2 LAT-NR460
and end up with Column 1 www.photobucket.com/a/aa/a/LAT-NR460.jpg Column 2 LAT-NR460
I have a workbook that I re-use on a weekly basis. The header information must stay intact (Rows 1 and 2). I recorded a macro that would clear all tabs in the workbook, and that macro is:
I am trying to get a macro that will insert a line above whatever line the text "INSERTXYZ" is in. I'm getting that fine but I also want to clear the contents of cells "A:S" on whatever the new row number is.
Can anyone modify this piece to accomplish that? If you need to tear it completely down, I'm interested in simpler way as well.
I want to sort the data by the comments in Column B, specifically by comments that do contain a telephone number, whether it is "Telefon" ( e.g. in B17 ) or "Phone" ( e.g. in B24 ) or "Téléphone" ( e.g. in B16 )
Im looking to ensure the sheet contents are clear before continuing with the macro routine. At the moment however, the macro runs I see the data flash up and then off. So it appears the data is being cleared as soon as it loads. Current code is:
(Split cell into multiple rows) I need a macro to remove contents within brackets in a cell.
Example: A1 contains [something, separated; a, couple of times; like, this] With, some; other, text
The result should be: With, some; other, text
I want the macro to remove the brackets and everything within it for all marked cells. (I do not want to use search and replace function since I got a lot of these data and needs to repeat this procedure).
how i might create a macro to attach to a button so i can delete the contents of all VALUE! cells. Either this or have a script in the background so no cell will return VALUE! (or any other error if possible)
I know if i had all the formulae sorted they might not butit's quite a large spreadsheet. The reason for the VALUE! error is text in cells that the formal points.