![]() |
Automatically prefix cell entry
Hi,
I'm looking to have a function or format or macro to take a user entry into a cell and then automatically prefix that entry and display the result. For example, if the prefix is set to ABC & the user enters 123 in cell A1, then as soon as the user goes to another cell, then A1 will display ABC123. I tried CONCATENATE, but that doesn't do quite what I am looking for because it keeps changing every time the worksheet is refreshed. There's got to be something simple to make a function out of a simple 'find & replace' task. Thanks in advance! Ross |
Automatically prefix cell entry
Use a custom format of
"ABC"# This will only change how the cell is displayed, not the cell value. The cell will display as ABC123 (in your example), but when you click on the cell you will notice the value of the cell is only 123. "rossinvrland" wrote: Hi, I'm looking to have a function or format or macro to take a user entry into a cell and then automatically prefix that entry and display the result. For example, if the prefix is set to ABC & the user enters 123 in cell A1, then as soon as the user goes to another cell, then A1 will display ABC123. I tried CONCATENATE, but that doesn't do quite what I am looking for because it keeps changing every time the worksheet is refreshed. There's got to be something simple to make a function out of a simple 'find & replace' task. Thanks in advance! Ross |
Automatically prefix cell entry
Try a custom format of:
"ABC"General -- HTH, RD ================================================== === Please keep all correspondence within the Group, so all may benefit! ================================================== === "rossinvrland" wrote in message ... Hi, I'm looking to have a function or format or macro to take a user entry into a cell and then automatically prefix that entry and display the result. For example, if the prefix is set to ABC & the user enters 123 in cell A1, then as soon as the user goes to another cell, then A1 will display ABC123. I tried CONCATENATE, but that doesn't do quite what I am looking for because it keeps changing every time the worksheet is refreshed. There's got to be something simple to make a function out of a simple 'find & replace' task. Thanks in advance! Ross |
Automatically prefix cell entry
On Thu, 4 Jan 2007 08:54:00 -0800, rossinvrland
wrote: Hi, I'm looking to have a function or format or macro to take a user entry into a cell and then automatically prefix that entry and display the result. For example, if the prefix is set to ABC & the user enters 123 in cell A1, then as soon as the user goes to another cell, then A1 will display ABC123. I tried CONCATENATE, but that doesn't do quite what I am looking for because it keeps changing every time the worksheet is refreshed. There's got to be something simple to make a function out of a simple 'find & replace' task. Thanks in advance! Ross Format/Cells/Number/Custom Type: "ABC"General For General you can substitute any valid number format. --ron |
Automatically prefix cell entry
Thanks, Sloth! It works like a charm! And it's as easy as I hoped it might be.
"Sloth" wrote: Use a custom format of "ABC"# This will only change how the cell is displayed, not the cell value. The cell will display as ABC123 (in your example), but when you click on the cell you will notice the value of the cell is only 123. "rossinvrland" wrote: Hi, I'm looking to have a function or format or macro to take a user entry into a cell and then automatically prefix that entry and display the result. For example, if the prefix is set to ABC & the user enters 123 in cell A1, then as soon as the user goes to another cell, then A1 will display ABC123. I tried CONCATENATE, but that doesn't do quite what I am looking for because it keeps changing every time the worksheet is refreshed. There's got to be something simple to make a function out of a simple 'find & replace' task. Thanks in advance! Ross |
Automatically prefix cell entry
THANKS TO ALL! :-)
"Ron Rosenfeld" wrote: On Thu, 4 Jan 2007 08:54:00 -0800, rossinvrland wrote: Hi, I'm looking to have a function or format or macro to take a user entry into a cell and then automatically prefix that entry and display the result. For example, if the prefix is set to ABC & the user enters 123 in cell A1, then as soon as the user goes to another cell, then A1 will display ABC123. I tried CONCATENATE, but that doesn't do quite what I am looking for because it keeps changing every time the worksheet is refreshed. There's got to be something simple to make a function out of a simple 'find & replace' task. Thanks in advance! Ross Format/Cells/Number/Custom Type: "ABC"General For General you can substitute any valid number format. --ron |
All times are GMT +1. The time now is 07:22 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com