I'm writing an Excel Macro and want to sum a number cell with the value "45667" and a text cell with the value "Prague" and return it to a new cell with the value " 45667 Prague"
I've done it successfully with the two text cells "John" and "Hopkins" to "John Hopkins".
This is my
Sub SumCells()
Dim FirstName, SecondName, Zipcode, City, fullname, fulladdres, space
FirstName = range("cell1").value SecondName = range("cell2").value Zipcode = range("cell3").value City = range("cell4").value space = " "
fullname = firstname + space + secondname fulladdress = zipcode + space + city
The problem is that city is recognized as "Prague", and the zipcode as 45667 (without the "")
We have approximately 100 rows x 200 columns of data and would like to combine the contents into one row. Is this possible without copying and pasting many times.
I have an requirement that retrieving the data from two different data bases. I want to compare those two and prepare a report using VBA. I am able to get the data to excel separately, but now I need to join these two sets based on the key columns
Column A2:A100 contains part description various len lengths max is 50 min is 22.
Column B2:B100 contains scrap qtys.
In column C2:C100 in need to join the text in A and B.
i want the scrap qty's all to be alligned i.e level, as column C is shown in a userformlist box.
meaning joining text/values would look like this (ignore full stops) dispenser calsberg .........70 tap beer......................... 80 cowl................................100
instead of dispenser calsberg 70 tap beer 80 cowl 100
I have a long OR function that I'm working on. The logicals for this change the search value from 1 to 9. Here is one of the logicals:
sumproduct(--isnumber(search(1,???)))=0
I need the "???" to be the arrays. The most complex of these will be: A1:C1&a2&c2&a3:c3 or is it A1:c1,a2,c2,a3:c3 or perhaps another join method like concatinate(a1:a3,a2,c2,a3:c3)
Cells E39:E53 are conditionally formatted to fill red if cell $AB$13=the cell 3 to its left .. eg: cell E39 would fill red if cell B39 (the cell 3 to the left of E39) is equal to cell $AB$13
Only one cell in the range will meet the condition at any time.
I also have the same range conditionally formatted to fill black if cell $AF$13=the cell 3 to its left .. eg: cell E39 would fill black if cell B39 (the cell 3 to the left of E39) is equal to cell $AF$13
Ranges F39:F53, and G39:G53, H39:H53 etc etc etc (all the way up to X39:X53) are all conditionally formatted the same way.
What I would like is for the cell that fills red in the first range to have a line connecting it to the cell that fills red in the second range, etc etc etc.
And the same for the cells that fill black.
Creating a chart from my data is not an option for other reasons, so I'd like to explore this possibility.
I'm dealing with 4 columns. Column A is a list of names. Column C is also a list of names, each with a number beside it in Column D (i.e "John Smith" in cell C1 with "10" beside it in cell D1). I need a formula that can search the list of names in Column A for the matching "John Smith", then put the corresponding number ("10") beside his name in Column B. Meaning...if the search finds the matching "John Smith" in cell A6, I need the formula to copy "10" to cell B6.
I am trying to change the value in a cell by referenceing it to another sheet. My cell is: Today it is 33F, have a nice day. Now, 33F should be called from another cell and should be inserted in this new cell. If I change the 33F in the other cell this change should be reflected in my text file.
I have a multipage control on a userform. On Page 8 of that multipage, I have label1, part of that label is modified by other parts of the program. This is done by the program writing to a sheet of Data and then the program pulls that info into this label. My question is,what is the correct format to populate the label? see below: This is what I have in my Userform_Activate and Userform_Initialize subs:
CurrentVersion = Sheets("Data"). Range("N2").Value Label1.Caption = "This will allow you to change the Caption of the UserForms through out the operational program. Some UserForms cannot be changed. The ending of" + Chr(32) + Chr(34) + "Automatic 2005 V" + Chr(32) + CurrentVersion + Chr(34) + Chr(32) + " will be added to what you enter below as default."
CurrentVersion is pulled off of the datasheet which is a number like 5.9.8.2. however it errors "Run time error 13 - type mismatch" I can only suspect the label1.Caption needs something like: Multipage8.label1.caption =
I have a column with numbers in each cell. I need to add the same three letters before each of the numbers. Example:
number in cell: 25067 I need it: ABC25067
I did a macro for it but had to do each one individually. I imagine there is a simple formula to do this automatically but I don't know enough to figure it out (despite reading up on it for the last hour!)
I have a sentence in field A1 and a number in field A2. The formula I am using is =A1 & A2. This is working but there is no space in between A1 and A2. How can I add a space?
This request is for Excel 2003 rather than 2007 (company does not have Vista or 2007 as I do personally). When two columns are used for an employee's 1st Name and 2nd Name, what is the random formula for combining BOTH columns in a random name pull? Since two people may have the same LAST name, only by accessing both column one (typically LAST name) and column 2 (first name) can they be identified if both last names appear in a random pull. I have used the random generator available from Excel Help online but do not know how to modify the parameters to accomplish keeping the first and second names from Column A and Column B together in the pull.
Explaining this will be widely useful for any company (such as trucking) using Excel for employee first and second names in two columns (assume A1 header 'Last Name', A2 header 'First Name'). Such companies need to be able to do a random pull to comply with DOT (Dept of Transportation) CDL re-certification, substance abuse screens, etc. I am just above a NOVICE user (I have a dozen books I try to learn from before asking).
I'm trying to write code to join two columns of data, and then join all of those into one cell.CA
California
DE Delaware
CT Connecticut
I want to be able to run the macro and have it put {"CA":"California","DE":"Delaware","CT":"Connecticut"} into cell C1.
I was thinking that this would have to be a two part macro. First, it would take each specific row and join CA and California and add the colon, quotation marks, and the comma, and put it Column C. Then, after it's gone through every row, it would join every cell in column C together.
This is what I've written so far:
VB: Sub test1() Dim r As Range Dim lr As Integer
[Code]....
Now I need to figure out the second part. How do I then take all of the join cells in column C and join them together, adding the curly braces at the beginning and the end, and removing the comma from the very last row?
Can you use two vlookup formulas as the text field in a concactenate formula? See below for example the formula I am using that is returning an #NA formula.
Join an array with Text elements to create a string that can be Evaluated
So for instance if I have Array("A", "B", "C") and I want to evaluate("=({" & Join(array, ",") & "})="A)"). Is there any way to do this without having to loop or push to a Named array first? I'll even take this evaluate thing if I can do it with text and numbers
How to do this with a macro but I want to join 6 workbooks together too make 1. Master sheet (7th copy). Below are the points of interest and a couple of questions.
1- My six books are all identical in cols. 2- The six books all have in col A my own ID number, no ID number is the same in any worksheet. 3- If I can get all 6 books together then the ID will start at #1 and finish approx at 225,000, in accending order. 4- All books have only 2 worksheets inside, Sheet1 and Sheet2 . 5- I don't want to delete or loose any data in the 6 books already made. Just make a 7th copy of the 6 . 6- The 6 w/books are called 6A- Each w/book contains approx 40,000 rows except last , approx 22,000
7- There are no functions in any of the w/books, just other macros which I want in the master copy. 8- Can the 7th copy be called UPTODATE STAKESWTD MASTER
Im currently working on making a workbook as a summary/join of several workbooks. All cells are formatted in the same way, and only Row 1 is the same in all workbooks.
How to combine several excel files into one file?
My issue is that when i run this macro, the rows are overwritten for every workbook runned through.
I end up with only the contents of the last copied workbook.
I guess my EndRow is wrong, or the copy function, since the offset is not set properly.
Code: Sub ExtractData()Dim basebook As Workbook Dim mybook As Workbook Dim FNames As String Dim MyPath As String Dim SaveDriveDir As String Dim Cnum As Integer
I am using the following formula to join several text strings together:
=CONCATENATE(B4,$A$1,C4,$A$1,D4,$A$1,E4,$A$1,F4)
(in the above $A$2 is just a few spaces in order to seperate the test)
I was wondering if there is a way of joing text strings that will align all info properly? Right now it just joiins them together but visually that is not really very appealing.
This is an example of what I am getting: 11 111 1111 11 111 22 2222 22 2222 222 333 33 3333 333 333
This is how I want it: 11 111 1111 11 111 22 2222 22 2222 222 333 33 3333 333 333
I am trying to join 2 tables which have identical columns. The columns are:
A B C D E F Date : Name : ID : Violation : Date Sent : Comments
Table 1 has information in columns A-E, Column F is blank Table 2 has information in columns A-F.
I want to be able to check the information in Columns A-E in both tables and add the information in Column F from Table 2 to Table 1 where Columns A-E are an exact match.
Split From Copy Non Null Cells In Column To Another. I'm trying to copy some of the results. How do you combine two variables with text into one cell. For example i want range("a1") = var1"."var2 so it would display var1.var2 if var1 = var1 and var2=var2
I am trying to append data in let's say column A:A with the variable text in J:J. The data in column A:A will look like this /dir/dir/dir/<from this point is where I need the data appended>.
The Complete Name is currently blank. The others just list the users Surname and First name. In the Complete name I need it to have Surname,Firstname - for example
Complete Name | Surname | First Name Jordan,Michael Jordan Michael
Is there a Formula (Not Macro) that I can use to combine the Surname and First name cells to populate the Complete name cell with the surname,first name???