Results 1 to 4 of 4

Thread: Add contents of one cell to another

  1. #1
    Join Date
    Mar 2009
    Posts
    1,221

    Add contents of one cell to another

    I created an excel spreadsheet, one sheet because I do not think I need more. I like:

    - Write text (name of study) in a cell
    - Write text (password) to another cell
    - Then in other cells, write text that is fixed by incrementing my 2 other cells in various locations.

    Example:

    Cell A1 = study1
    Cell A2 = password
    Cell A3 = config PFADMIN CDD_Cell CSD A1 Unit A1 Unit A2 enable
    Cell A4 = config PFADMIN CDD_Cell CSD A1 Unit A1 Unit A2 active

    This is to get into the cell:

    A3 = config PFADMIN CSD CDD_study1 study1 enable password
    A4 = config PFADMIN CSD CDD_study1 study1 password active

    I do not want that generates calculations in Excel, I just want my cell A3 completed correctly to make a simple copy and paste to use it elsewhere (in DOS )....

    Is there anyone who can suggest me how to add contents of one cell to another?

  2. #2
    Join Date
    Apr 2008
    Posts
    2,005

    Re: Add contents of one cell to another

    Look if MID () does not solve your problem. Otherwise I see no other method that the code CELL ("contents", A1)

    tries to edit
    A1 => name
    A2 => password
    A3 => config PFADMIN CSD CDD_
    A4 => enable password
    A5 => password active

    Form A6
    = CELL ("contents", A3) & CELL ("contents", A1) CELL ("contents", A1) & CELL ("contents", A2) & CELL ("contents", A5)

    or manages the trick ... probably some adjustments in the strings, but the principle is that: if you need a space to add between 2 strings insert a & "" & between the two.

  3. #3
    Join Date
    Mar 2009
    Posts
    1,221

    Re: Add contents of one cell to another

    Thank you for your help.

    I think I found another interesting alternative: the CONCATENATE formula:

    =CONCATENATE("text text";A1;A2;"text")

  4. #4
    Join Date
    Nov 2008
    Posts
    1,022

    Re: Add contents of one cell to another

    You can even do the same using the VBA coding as follows:

    Code:
    Sub addText()
    
    Dim strMyText As String
    strMyText = Cell("A1").Text
    
    Cell("A1") = strMyText + Cell("A2").Text
    
    End Sub

Similar Threads

  1. Applying absolute cell referencing to many cell in Excel
    By Nyota in forum MS Office Support
    Replies: 2
    Last Post: 24-02-2012, 07:23 PM
  2. Replies: 2
    Last Post: 04-01-2012, 06:54 PM
  3. Cell Padding and Cell Spacing in HTML
    By Claudius in forum Software Development
    Replies: 3
    Last Post: 14-05-2009, 01:35 PM
  4. Excel cannot see entire contents of a cell
    By ricardoramey in forum Software Development
    Replies: 3
    Last Post: 04-05-2009, 09:51 PM
  5. Auto-populate a MS Word table cell with text from a diff cell?
    By dreamrthts in forum Windows Software
    Replies: 5
    Last Post: 23-03-2009, 10:39 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,576,255.16680 seconds with 17 queries