I would like to do now would be to only copy the rows that also contain the word sold in column C. I guess that I could do this in two stages, first copying the rows based on the year then copy again based on the word sold in column C. It would be nicer to make a slight modification to my code and do it all in one step.
I have a list of about 2 million phrases. The list was created by combining two lists in all possible combinations:
a list of about 800 street names a list of about 1000 property names
example
church street flat church street apartment house church street house king's road etc
what I would like excel to do is the following:
look at each cell and determine which of the 800 street names it contains. write that streetname into adjacent cell.
this would then leave me with the original column, where each of the 2 million cells has been assigned one of 800 streetnames.
for example:
church street flat | church street church street apartment | church street house church street | church street house king's road | king's road
that's all. I think that can't be too difficult, and probably it has already been discussed here in the forum. unfortunately I did not know for which keywords to search, that is why I couldn't find the posts.
I hope somebody can help me as I need to get this sorted for work as soon as possible. All semi-automatic ways I could think of to accomplish this would take me days that I don't have.
I will have 2 columns. In column B, will be a list of invoice numbers. Now each one starts with the "job number" (Ex. 51APGC01) then a dash and unique number per invoice. (Ex. 51APGC01-01)
In column A, will be a list of Purchase Order numbers sent by the customer so we can bill. Now, sometimes we get one PO for multiple invoices, (Ex. 03, 05, 06, 07.....)
What I am looking to do, is when I get these PO's, I enter them in and then I print a report for our billing Dept. The way the output line (cell) will read, is Job Number, then each unique number: (51APGC01-03, 05, 06, 07)
There are multiple jobs and each one has it's own report, so the job number will be dynamic and defined else where in the workbook. I can define that. It's just getting the numbers after the "-" and putting them in only.
I have a script that copies data to files based on many cells contents but where I am having a problem is creating series numbers for each file.
File-01.txt File-02.txt .. File-100.txt
In my current code I copy files to folders by date and each folder I need series of files (Lab Testing series)
In column A1:A100 I have a series of numbers 01, 02, 03 ...100
Column B contains the Files to be saved C:LAB2012Jan1file-01.txt C:LAB2012Jan2file-01.txt C:LAB2012Jan3file-01.txt C:LAB2012Jan4file-01.txt ... .. C:LAB2012Dec31file-01.txt
So this works fine
I now need the Script to do is to loop to Column A and select Cell 2 and do the File Copy again on the Next series
When Complete repeat until it reaches the end of column A
Since my Cells are populated by all the data in the workbook I thought at the end of my copy script I would take the next Cells data in A and put it in Cell H8 where all the constants are for the file names.
Have a slightly unique issue that I can't seem to find the specific solution for. I am wanting to filter a range, using row 1, then copy the visible cells (Excluding the title row 1) and paste into the same location, so over the data as Values.
I can do the filtering part and the selection of the visible row. Only trouble is pasting it to the same location.
this is the code so far - anything better would be great
Sub Macro2() Sheets("GF_Scoring Database").Activate Dim extvalue As String Dim rng As Range
I have a column in my .XLS whose contents I want to change depending on what the contents of the cells of a different column are. However, I only want two cells from the same row to be dependent on each other. So, for example, if $A$1 reads "1" then $B$1 should read "apple" and if $A$2 reads "1" then $B$2 should read "apple"; if $A$12 reads "3" then $B$12 should read "pavement" etc.
I wish to copy a merged cell (3 cells) based on if only 1 of 3 cells to the right contain "X". if the top cell does not contain "X" than the merged cell is not copied. Also, is therea more elegant to copy 3 columns at a time rather than do one at a time as my code shows:
Sub CopyICUCAPU() ' ' CopyICUCAPU Macro ' Dim i As Integer
On sheet "CoA" i have at table of periodic payments that is created via an input form and what I want to do is have accounting entries automatically generated in my cask book based on dates.
I have on sheet "Charts" in cell "B20" a "date from" and in cell "C20" a "date to" (these will be input manually).
What I need is to check Column "F" on sheet "Report" for any cells within those dates, I then want to copy the entire row(s) that contain these dates and paste them into sheet "Weekly" starting at cell "A2".
This is a project plan with tasks and dates. Column A is the activity number. (Example 1, 2, 3" etc). Column B is the task (Ex. "Complete Report"). Column C is number of days required to complete the task. Column D is the dependency column. (Ex. Cell D2 =1 in other words Task 2 is dependent on task 1). Column E is the date.
I would like to have a seperate start date cell and a go live date cell.
The objective is to enter a start date, and have each column E date increase based on the number of days entered in Column C. If a task is dependent on another and I change the number of days in Column C I need the dependent task to change the same amount of days.
I need to confirm that a date is entered correctly into a userform.
This code works for a command button, but not for a WorkSheet_Change event.
My textbox is the first in the userform, and needs to be checked immediately, as the labels in the rest of the userform all change to reflect the date that was entered.
What is the best way to do this? I tried a keycode = vbKeyReturn option, but cannot get it to work?
Code: Private Sub DateCheck() Dim DateString As String Dim DateProper As Date Dim EntryOK As Boolean EntryOK = False
I am referring to the post made by NBVC at http://www.excelforum.com/excel-gene...xcel-help.html, Try: =IF($A1="",INDIRECT("A"&ROW()-ROW($A$2)+COLUMN(B1)),"") in B2, copied across and down
I have a similar case but there are no empty rows between lists, what would be the formula to get the same results? (The transposed address should appear next to each first line of each block).
Earlier, I posted at http://www.excelforum.com/excel-gene...-one-cell.html and I got brilliant answers, I also would like to get benefit of the above mentioned formula but in cases when there are no empty rows between lists.
I am looking for a code that will clear all of my unlocked cell in sheet 1. That is not a problem but since many of the cells are merged I know it keeps throwing me an error saying cannot change contents of merged cells or something like that. Does anyone know how to get around this without unmerging the cells. I saw a code to unmerge all of the cells on a sheet but I really don't want to do this as I already have worked around most of my problems with the merged cells.
I need a macro to have the copy of selected cells on sheet1, and paste it on sheet2 of the same workbook, whenever I take the print of the sheet1. My requirement is that Each time when I take the print, the selected items get pasted simultaneously on next available cells on sheet2.
Example of my worksheet is attached : Example.xlsx
I am trying to copy a column of cells from one sheet to another, but also want to keep all the formatting. The origin sheet has times, but when I copy these to the destination sheet they are displayed as decimal numbers (using the code snippet below). I can change these back to times by formatting the cells using the format painter after the macro completes but I would like the VBA to do this for me. (using 2002 SP3).
I need a way to copy part of contents from a cell, the cell contains product information like size, name and weight of a product, and I need a copy the weight to be put in it’s own cell, here’s a copy of one cell “E65 MAPP SKDV 5 DIGIT 90G ST.K” the information I need from this is “90” the number is always followed by a capital G, but it’s between two and three digits where the lowest is 55G and the highest is 300G. Is this possible?
I would like to copy the contents of a cell from a sheet in workbook 1 into a textbox that is on a userform in workbook 2. This is what I have but I get a runtime error 438:
I have created a string that contains the absolute path to a text file. Using VBA how would I move the text within this text file into Textbox1 on Sheet1?
What is the proper VBA code to copy the contents of column T and column W (beginning at row 2 and ending at the last nonempty cell) in sheet 1 to column D and column E in sheet 3? Column T and column W always contain the same number of nonempty cells.
I have a workbook with lets say 10 sheets. 9 of the 10 sheets are identical as far as layout, they just hold different information for different employees. I need to get a range of cells that are NOT empty and copy that data to the 1 different sheet (summary page). A6 through A25 is where the data is going to be, but all those cells may not be filled up, so I want to drop the empty cells from the range. So If only A6-A15 are filled, then those are the only ones that get copied. ALSO (dont you love that) I need to take that number range and have columns A, F and I as well. So if I have A6-A15, I will need the data out of F6-F15 as well.
I have 10 separate files that each have a data input sheet. I have 1 master file that has all 10 sheets in it and an extra sheet to display all 10 sheets information on 1. The drama I am having with sorting the master sheet is that every cell in the 10 sheets has a formular to copy what in the corresponding cell within the separate file. So techincally, the cells are not blank.
The cells range is B5:G1004 on every sheet. I paste 'values only' from the range of each sheet into the master sheet, but when I go to sort column B Ascendingly, it puts all the data at the bottom of the rows and there is 10000 rows on the master sheet. I cant get it to flip around. What I need is a way to clear the cells on the 10 sheets that do not have a value before I paste into the master sheet.
I have a multiple sheet workbook designed to collect information which is all collated on the last sheet. On one sheet I have a textbox (not the drawing textbox) which is designed to take a string of characters of a specific lenght (150chars) and works well. I'm just trying to get the code to work with a textbox on the same sheet for now, then when its working change it to copy over to another sheet.
Sub TextBox_To_TextBox() Dim x As Integer Dim PreEmp As TextBox, PreEmp2 As TextBox Dim theText As String Set PreEmp = ActiveSheet.TextBoxes("PreEmp") Set PreEmp2 = ActiveSheet.TextBoxes("PreEmp2") For x = 1 To PreEmp.Characters.Count Step 150 theText = PreEmp.Characters(Start:=x, Length:=150).Text PreEmp2.Characters(Start:=x, Length:=150).Text = theText Next End Sub
I'm calling the sub routine but nothing seems to happen.
Date formatting. I have two columns first column is for the date (3/6/2013) and the second column is for the time (12:37:16 AM). I would like to combine the content of both columns to be like (2/11/2013 12:35:00 AM) .
I am using concatenate but I don't have any luck. How to combine the content of my two columns.
Some of the cells contain a variety of dates (formatted as d-mmm) Other cells contain either "i", "n" or are blank - or contain a text string, eg "his name"
I'm looking macro code that will: Look at the range and only for any cell containing a date, replace it with "y".