![]() |
Add information to a cell with Data
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 |
Add information to a cell with Data
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 .... maperalia wrote: 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 -- Dave Peterson |
Add information to a cell with Data
Dave;
Thnaks very much. It is working wonderfully. Maperalia "Dave Peterson" wrote: 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 .... maperalia wrote: 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 -- Dave Peterson |
Add information to a cell with Data
Dave;
Thanks very much. It is working wonderfully. Maperlia "Dave Peterson" wrote: 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 .... maperalia wrote: 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 -- Dave Peterson |
All times are GMT +1. The time now is 09:59 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com