Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 31-10-2009
Member
 
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?
Reply With Quote
  #2  
Old 31-10-2009
Member
 
Join Date: Apr 2008
Posts: 2,001
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.
Reply With Quote
  #3  
Old 31-10-2009
Member
 
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")
Reply With Quote
  #4  
Old 31-10-2009
Member
 
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
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags:



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Add contents of one cell to another"
Thread Thread Starter Forum Replies Last Post
Applying absolute cell referencing to many cell in Excel Nyota MS Office Support 2 24-02-2012 07:23 PM
How to restore cell gridlines lost after coloring the cell in Excel? Chitti's Windows Software 2 04-01-2012 06:54 PM
Cell Padding and Cell Spacing in HTML Claudius Software Development 3 14-05-2009 01:35 PM
Excel cannot see entire contents of a cell ricardoramey Software Development 3 04-05-2009 09:51 PM
Auto-populate a MS Word table cell with text from a diff cell? dreamrthts Windows Software 5 23-03-2009 10:39 PM


All times are GMT +5.5. The time now is 02:29 AM.