How To Set Cell Background Image In Iphone?

Merging cells in a mstable

  • QUESTION: Hoping you can help me out with a macro to merge cells in a table. The table will always have two columns, and be arranged as: C1 C2 R1 | name1 | | R2 | | Atext1 | R3 | | Atext2 | R4 | | Atext3 | R5 | name2 | | R6 | | Btext1 | R7 | | Btext2 | R8 | | Btext3 | When merged, the table would appear as: C1 C2 R1 | name1 | Atext1, Atext2, Atext3 | R2 | name2 | Btext1, Btext2, Btext3 | Thank you, in advance, for any assitance you can provide. ANSWER: You can use the following formula in C1 enter =CONCATENATE(C2," ",C3," ",C4) in C2 repeat the fomula from C1 Hope this helps. Mary A. Lindsey eDoc Support LLC www.edocsupport.com ---------- FOLLOW-UP ---------- QUESTION: Thanks so much for your reply. I apologize for sacrificing clarity for brevity. Here's the background for this request. Every morning I receive a text report of hospital lab errors in a work queue. In column 1 is the patient's name, and any other identifying data. In column 2 are the test(s) that each patient had. The number of errors varies day to day. My first step is to pull everything into adocument. Next, I convert the text to a table. All data ends up in columns 1 and 4, so I delete 2 and 3, so I end up with the two column table pictured in the image (see patients AAAA and BBBB). My end goal is to pull these into anspreadsheet, but since I can't merge cells inwithout losing information, I wanted to do the merge inbefore I pulled the information to(see patients CCCC and DDDD). If I could merge while importing to Excel, that'd be fine (whatever's easiest). Themacro I have is: Sub ImportWordTable1() 'Import one table to current sheet Dim wdDoc As Object Dim wdFileName As Variant Dim TableNo As Integer 'table number in Word Dim iRow As Long 'row index in Excel Dim iCol As Integer 'column index in Excel wdFileName = "C:Documents and Settingsstep3.doc" Set wdDoc = GetObject(wdFileName) 'openfile With wdDoc TableNo = 1 With .tables(TableNo) 'copy cell contents fromtable cells tocells For iRow = 1 To .Rows.Count For iCol = 1 To .Columns.Count On Error Resume Next Cells(iRow, iCol) = WorksheetFunction.Clean(.cell(iRow, iCol).Range.Text) On Error GoTo 0 Next iCol 'go to the next column in this row Next iRow ' go to the next row End With End With Set wdDoc = Nothing End Sub I know I'm probably not saying this as eloquently as I could, but I was thinking that for column 2, as long as the next cell's not empty concatenate it with the one before it (using some sort of an indexing scheme and a buffer for the conatenated text)....Just a thought. Since I can have hundreds of errors per day, a macro would be great.

  • Answer:

    Have you tried creating a macro from the first time you start to clean up the file you receive, including when you merge the cells inand once accurately merged in Word, open the file in Excel. I am not a VBA expert, and I need to have the file (or a simulated version without patient information) you are trying to work with in order to design the macro you want. I know that this is not possible, so please create a macro and start the process you normally use to clean up the text file. I know that if you just record all the steps you take to accomplish the finished document (including thepart of the equation), you will have a wonderful macro.

Miningco.com Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.