Add information to a cell with Data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can I have a statement to add information to a cell that already has data.
For example the cell has the following description:

depth = Worksheets("DEFAULTS").Range("C6")

However, when I choose NO in a if condiction (see below) I want to add "_2nd
file" to this specific cell:

ElseIf resp = vbNo Then
'save the file by adding (2nd file)
depth = "" & depth & " " & "__2nd file" & ""

I added as I show above but it is not working.
Could you please help in this matter.

Thanks.
Maperalia
 
You've updated the string Depth, but you haven't updated the cell yet:

ElseIf resp = vbNo Then
'save the file by adding (2nd file)
depth = depth & " " & "__2nd file"
worksheets("Defaults").range("c6").value = depth
....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top