Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
help on combine program
Can I please get help with the following code. Private Sub CommandButton1_Click() Application.ScreenUpdating = False Application.Calculation = xlCalculationManual lastrow = Cells(Rows.Count, "a").End(xlUp).Row For Each c In Range("a2:a" & lastrow) c.Offset(, 5) = c & ", " & c.Offset(, 1) & ", " & c.Offset(, 2) & ", " & c. Offset(, 3) Next c Application.ScreenUpdating = False Application.Calculation = xlCalculationAutomatic End Sub this basically will read entire document and combine the cells I want. but I want to use the sme type of program to combine just one line not read the entire document as I want to embed it in the same sheet as another chart. thanks. -- Message posted via http://www.officekb.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
help on combine program
i don't get the question. Do you want this for a single cell? this would work for a selected cell or range with selection .Offset(, 5) = c & ", " & .Offset(, 1) & ", " & .Offset(, 2) & ", " & ..Offset(, 3) End With or for a specific cell it would be with Range("A1") .Offset(, 5) = c & ", " & .Offset(, 1) & ", " & .Offset(, 2) & ", " & ..Offset(, 3) End With "Darrell_Sarrasin via OfficeKB.com" <u33691@uwe wrote in message news:97fb2711ea511@uwe... Can I please get help with the following code. Private Sub CommandButton1_Click() Application.ScreenUpdating = False Application.Calculation = xlCalculationManual lastrow = Cells(Rows.Count, "a").End(xlUp).Row For Each c In Range("a2:a" & lastrow) c.Offset(, 5) = c & ", " & c.Offset(, 1) & ", " & c.Offset(, 2) & ", " & c. Offset(, 3) Next c Application.ScreenUpdating = False Application.Calculation = xlCalculationAutomatic End Sub this basically will read entire document and combine the cells I want. but I want to use the sme type of program to combine just one line not read the entire document as I want to embed it in the same sheet as another chart. thanks. -- Message posted via http://www.officekb.com |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
help on combine program
currently I have it so that it reads the entire document in columns A-D and E combines the lines in one cell so I can copy and paste it. I want to be able to take it and instead of doing the entire document just run it on one line only. Patrick Molloy wrote: i don't get the question. Do you want this for a single cell? this would work for a selected cell or range with selection .Offset(, 5) = c & ", " & .Offset(, 1) & ", " & .Offset(, 2) & ", " & .Offset(, 3) End With or for a specific cell it would be with Range("A1") .Offset(, 5) = c & ", " & .Offset(, 1) & ", " & .Offset(, 2) & ", " & .Offset(, 3) End With Can I please get help with the following code. [quoted text clipped - 19 lines] thanks. -- Message posted via http://www.officekb.com |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
help on combine program
sorry too early in the morning. Right now I have it so that someone can put their address in cell A-D. We need to have it this way as we are are bringing the addresses in from a database. So Address is A2, city is B2, State is B3, Zip Code is B4. In b5 we combine the addresses as we need to put that in another chart. right now its programmed to read the entire worksheet and combine all the lines till the last line. I just need it to run the one line not do the entire document. so I just need it to run row 2 not all. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200906/1 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
help on combine program
you mean one row? that was covered in my code earlier why not just have a formula =A1 & B1 & C1 & D1 & E1 "Darrell_Sarrasin via OfficeKB.com" <u33691@uwe wrote in message news:97fb6c7c208d6@uwe... currently I have it so that it reads the entire document in columns A-D and E combines the lines in one cell so I can copy and paste it. I want to be able to take it and instead of doing the entire document just run it on one line only. Patrick Molloy wrote: i don't get the question. Do you want this for a single cell? this would work for a selected cell or range with selection .Offset(, 5) = c & ", " & .Offset(, 1) & ", " & .Offset(, 2) & ", " & .Offset(, 3) End With or for a specific cell it would be with Range("A1") .Offset(, 5) = c & ", " & .Offset(, 1) & ", " & .Offset(, 2) & ", " & .Offset(, 3) End With Can I please get help with the following code. [quoted text clipped - 19 lines] thanks. -- Message posted via http://www.officekb.com |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
help on combine program
will that not leave it as a fomula. I need to be able to copy and paste it as we will be running about 25 instances the same day all with differnt info Patrick Molloy wrote: you mean one row? that was covered in my code earlier why not just have a formula =A1 & B1 & C1 & D1 & E1 currently I have it so that it reads the entire document in columns A-D and E [quoted text clipped - 24 lines] thanks. -- Message posted via http://www.officekb.com |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
help on combine program
just copy/pastespecial Values "Darrell_Sarrasin via OfficeKB.com" <u33691@uwe wrote in message news:97fbca0a802de@uwe... will that not leave it as a fomula. I need to be able to copy and paste it as we will be running about 25 instances the same day all with differnt info Patrick Molloy wrote: you mean one row? that was covered in my code earlier why not just have a formula =A1 & B1 & C1 & D1 & E1 currently I have it so that it reads the entire document in columns A-D and E [quoted text clipped - 24 lines] thanks. -- Message posted via http://www.officekb.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I combine worksheets w/o enough rows to combine? | Excel Worksheet Functions | |||
Combine cells with the same reference and combine quantities | Excel Discussion (Misc queries) | |||
Is there a good program for excel to combine, compare, and edit bo | Excel Discussion (Misc queries) | |||
merging excel program with tdc finance program | Excel Programming |