If Specific Row Contains A Word Then Clear Specific Content In Corresponding Column
Jun 18, 2014
I have a row (will always be row 3) where each cell contains a day of the week, the days repeats for a year or so, making the row almost 400 cells.
Mo - Tu - We - Th - Fr - Sa - Su - Mo - Tu - We - Th - Fr - Sa - Su - and so on...
Though, A3 doesn't have to be "Mo" because the days in this case can change (A3 can start with "Tu"), hence I think I need a macro.
So if this row contains a weekend, "Sa or "Su" I want all the cells in the column beneath that which contains a specific value to be cleared.
Example, if "Sa" or "Su" has 3 values in the columns under them, all the values that contain "X" or "Y" has to be cleared.
3 Mo - Tu - We - Th - Fr - Sa - Su - .. and so on..
4 A --- B --- X --- Y --- X --- B --- Y
5 A --- B --- X --- Y --- X --- X --- X
6 A --- B --- X --- Y - --X --- Y --- C
After the macro it should be:
3 Mo - Tu - We - Th - Fr - Sa - Su
4 A --- B --- X --- Y --- X --- B ---
5 A --- B --- X --- Y --- X --- ---
6 A --- B --- X --- Y - --X --- --- C
I have a worksheet that contains two basic columns of data, A and B. What I would like to do is based on the value in column A, I would like to copy the contents of column B to a textfile (preserving the basic line structure and hopefully without any extra characters like quotation marks attached). So for all the values in column A = 'Account', Id like to take all the corresponding values in Column E (for example) and save them to the same file, preferably where the filename itself as 'Account.xyz'. And I would like to do this for all unique values in Column A, that is do it for 'Account' and 'AccountPrivilege' etc. Note Column A is essentially presorted alphabetically already. There are actually 1000s of rows with hundreds of unique A values so Id like to find a way to automate this process.
I am trying to run a macro once a particular word shows up in the combo box. now in my chase i could try to use VBA code to run the macros such that once the arrow is used in the combobox to select a certain word a particular macro labled the same name as the word chosen would run.
I have a userform where the user will identify a record to delete. I need to search another worksheet (Month) for the event's name which is associated a date. Once it finds this event's name I need to clear the contents of that cell.
Here is the code I am using for the record deletion from the 'Data" worksheet. I need to also locate and clear the cell as stated above.
I have a database in excel, here's some sample data.
When they click the print button in Cell A2, up comes my form
When the print tags button is pressed, my secondary sheet is populated with the cell they clicked on
Now it's using a font, calibri 11, which isn't proportional but I was wondering if there's a way in VBA to "auto" detect the max width and place words on the next row accordingly (like a word wrap). Here's what I need it to look like:
Here's my existing code to place the comments as is:
I would like to use the following code to see if the word "reservoir" shows up in any of the rows in a certain column. If it does I want to insert the formula = SUM(D7:D257)*0.1 into cell C2 and if it doesn't then I want to put a 0 into cell C2. I've tried many routes but can't get past the error if it can't find the word.
I have a spreadsheet with 12 coloums. In the last coloum are the ords "yes", "no", or is empty (null?). I need to find a way to have each row that contains the word "no" or is empty to be highlighted in red font and bold type. When the word "yes" is typed then the font is black and the type in normal. This allows me to see at a glance what orders have not been picked up or have problems.
I'm trying to find a way to use a macro to extract data from a specific column from Sheet1 based on the columns header/title and copied into Sheet2 into the respective column with matching header/title.
For instance, in Sheet1:
Chicken Cow Donkey Pig
So the above table would be the result i'm aiming for.
NOTE, its not different workbooks. I'm looking for sheet to sheet macro.
I've attached a file as well if someone wants to have a go at it. There are no codes in it.
Currently I am using the Kickbutt VBA Find Function of Aaron, but I would like to have something that works more efficiently. What I currently do is (assuming all possible values for Column J are A - F):
I have need of VBA code that will check collumn D, starting at cell 7 until cell 206, for when data that is entered starts with 100. When this occurs it will remove all of the data in that same cell except for the last 12 digits.
Here's an example.
When using our barcode scanner to capture a FedEx Tracking number the barcode captures the following:
Embedded in that long string of numbers (which are formatted as Text) is the tracking number. Specifically the last 12 numbers are the tracking number. However, FedEx varies this code at times so the last 12 numbers are the tracking number only with the raw data captured by the scanner starts with 100. Until I find additional conditions this VBA code will have to ignore all of data that is captured in collumn D starting at cell 7 until 206.
I am having some trouble writing a macro to delete cell content. I know which cells I want to clear, but I can't seem to get the macro to do it.
I also want to have something in the macro that inserts data into the lines that I am trying to clear. I want cell A67 to say "Payment" and cell A71 to say "Total."This is the code I am using: Sub DeleteCell() Dim i As Integer For i = 67 To 71 If Range("A" & i).Value = "--" Then Range("A" & i).Delete Next i End Sub
I am using arrays to try and move select data in a row between workbooks. I read in the data to an array, I set the value of the range I want to write to to the array. That part works well.
However, the range I am trying to write to is part of an Excel Table (ListObject). There are formulas in that table that I need to keep as formulas. I know (well, believe) that if I populated the data into the array manually and skipped over the formula cells it would not change those cells at all.
How can I (after populating the entire array with data) go back and say "The data at index 3 is really nothing, so exclude it."
I've tried setting the value to Null, Empty, and vbNullString. My array is currently typed as a Variant.
Below is my initial code that can't get past the first line.
if right(cells(2,i),4) = "D_MA" then ..... ?
I'm trying to clear the contents of all data in each column that has the text conaining "D_MA" in that columns row 2. For instance, if cell F2 has 30D_MA, I want the macro to clear all contents in Column "F" -- but to do this for all columns that contain "D_MA" in row 2.
I need to start with a worksheet without any objects, namely pictures. Without knowing the name of the object, is there a way to clear all objects on a worksheet?
Second: on a different worksheet there are products with pictures with the product number. When a user selects the product number I want to copy that picture and copy it to J42 of the first sheet. My issue is positioning the picture.
Looking to create a calendar in excel and auto-populate the content with specific fields I enter. I know how to create an excel gantt chart but I'm really looking for a calendar view instead of a series of columns with dates. I reviewed the original post on Auto-Populating Excel Calendar but was confused by the instructions. (1) create a calendar in excel and (2) show me how to populate the calendar with fields like (dept and project name) into the dates on the calendar? I have two dates that are important (a due date for the project and when that project will be published). Is there a way to have both dates show info otherwise the most important date will be the publish date?
I am setting up a charity accounts sheet, that will also calculate money raised from Raffles, so each raffle will have a name, I can do this by matching the amount with a description but wondered if I could calculate it by looking for specific words or reference in a cell
Sum all cells that the adjacent cell contains the reference "Raffle 0001" but not "Raffle 0002" this needs to be calculated on another cell
Sum all cells that the adjacent cell contains the reference "Rescue" this cell could contain other text as well, so could say "Rescue for Sweetie by Laura Herarty" or "Rescue for Bliss by Jane Telford" all need to be calculated.
I have number in cell (A1) = 100. when I enter number in any cell of column(B) for example (B1)=10. then in cell (C1) the result of (A1) - (B1) = (90) and if I add in cell (B2)=10 then in cell (C1) the result of (A1) - (B1+B2) = 80 .accumulatively in cell (C1). and any number in column (B), the result will be (A1) minus any number in column(B) accumulated in (C1)
I have number in cell (A1) = 100. when I enter number at cell (B1) = 10 then the result would be in the adjacent cell (C1) = (A1) - ( B1) = 90 and If I enter a new number in cell (B2) = 10 then the result would be in the adjacent cell (C2) = (A1) - (B1+B2) = 80 and If I enter a new number in cell (B3) = 10 then the result would be in the adjacent cell (C3) = (A1) - (B1+B2+B3) = 70 and so on. I want the result to be add automatically to adjacent cell in column (C)
Is there a formula to find a specific word through many columns? Between A1 and L4500 i got a lot of diffrent information. I want to show if there is any cells in the row with the specific text, a formula in column M. Etc. If C100 got "topside" a notice in column M
I am using the formula below to calculate the number of days left to do something, when there are no days left I want the cell to display "Begun" in red italic text. Is it possible to do that via this formula or is a macro needed? =IF(ISBLANK(E2),"",IF((E2-I2)<0,"",E2-I2-10&(" Days")))