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

emhughes

New Member
Joined
Jun 11, 2021
Messages
5
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

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Welcome to Mr. Excel.

Would you post an example or two using XL2BB ? Thanks.
 
Upvote 0
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
 
Upvote 0
Solution
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
 
Upvote 0
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)
 
Upvote 0
sorry i cut some rows to make it smaller
the text to add is input by user

evan
 
Upvote 0
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.
 
Upvote 0
kweaver

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

Evan
 
Upvote 0

Forum statistics

Threads
1,214,650
Messages
6,120,734
Members
448,987
Latest member
marion_davis

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
Back
Top