KEEP EXISTING TEXT AND ADDING TEXT IN MULTIPLE CELLS IN 1 WORKSHEET

emhughes

New Member
Joined
Jun 11, 2021
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Hi All,
New to this forum and I need help.
I have a worksheet with 6 cells that I wish to add text to yet keep existing text.
cell a:20 Name1:
cell d20 Date:
cell a:32 Name2:
cell d:32 Date:
cell a:35 Name3:
cell d:35 Date:
I need these to add text after contents of cell with a space after the colon.
eg. Name1: my name Date: 10-06-21
Have searched the forums and tried many macros but keep getting errors. Can do for just one cell but with multiple cells in one sheet it falls down.
Any help appreciated.

Evan
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

kweaver

Well-known Member
Joined
May 8, 2018
Messages
2,105
Office Version
  1. 365
  2. 2010
Welcome to Mr. Excel.

Would you post an example or two using XL2BB ? Thanks.
 

kweaver

Well-known Member
Joined
May 8, 2018
Messages
2,105
Office Version
  1. 365
  2. 2010
Are you prompting for the input? If so, what about this:

Code:
Sub AddText()
Dim NewText As Variant

NewText = InputBox("Name1 ?")
Cells(20, "A") = Cells(20, "A") & " " & NewText

NewText = InputBox("Date ?")
Cells(20, "D") = Cells(20, "D") & " " & NewText

NewText = InputBox("Name2 ?")
Cells(32, "A") = Cells(32, "A") & " " & NewText

NewText = InputBox("Date ?")
Cells(32, "D") = Cells(32, "D") & " " & NewText

NewText = InputBox("Name3 ?")
Cells(35, "A") = Cells(35, "A") & " " & NewText

NewText = InputBox("Date ?")
Cells(35, "D") = Cells(35, "D") & " " & NewText

End Sub
 
Solution

emhughes

New Member
Joined
Jun 11, 2021
Messages
4
Office Version
  1. 365
Platform
  1. Windows
kweaver,

xl2bb attached

Evan

Checklist.xlsx
ABCD
1 CHECKLIST
2
3
4
5Name1:Date:
6
7
8
9
10
11
12
13
14
15
16
17
18
19Name2:Date:
20
21
22Name3:Date:
Sheet1
 

kweaver

Well-known Member
Joined
May 8, 2018
Messages
2,105
Office Version
  1. 365
  2. 2010

ADVERTISEMENT

What you just posed was obvious. How are you getting the input you want concatenated with the existing text?
(but, you also said rows 20, 32, and 32 in your original post)
 

emhughes

New Member
Joined
Jun 11, 2021
Messages
4
Office Version
  1. 365
Platform
  1. Windows
sorry i cut some rows to make it smaller
the text to add is input by user

evan
 

kweaver

Well-known Member
Joined
May 8, 2018
Messages
2,105
Office Version
  1. 365
  2. 2010
sorry i cut some rows to make it smaller
the text to add is input by user

evan
So, can the user reply to the prompts from my previous example or are they looking at the sheet and entering the information? If they enter the info, they'll replace what's in the cell not concatenate it with the preexisting text.
 

emhughes

New Member
Joined
Jun 11, 2021
Messages
4
Office Version
  1. 365
Platform
  1. Windows
kweaver

Thank you the code you posted works fine I will mark post as solved.

Evan
 

Forum statistics

Threads
1,141,068
Messages
5,704,087
Members
421,326
Latest member
pfaustino

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top