Add pre-defined text to a cell based on input from a different cell

  • I want to have VBA code add specific words to a cell (B2), based on a string of letters in a different cell (A1)...

    As an example I have 10 buildings, each represented by a string of letters. In cell A1, I want to input the building designation (ie: "bnumber3".. but each building number has a different text string), and then I want a pre-defined text string to populate cell B2... something like "3 bedroom and 3 garages".

    There is already some vba in the file, but not performing the functionality mentioned above.


  • vwankerl

    Thanks for the response...I thought I had the file working OK for awhile, but have managed to ruin the original macro. Will rebuild the sheet and see where I stand after that.


  • I'm not sure what I have done , but now I am getting the following error code:

    Microsoft Visual Basic

    Run Time Error '1004"

    Unable to get the Characters property of the Range class"

    I opened an earlier version of the file, but now get the same error for it as well.

    Can someone steer me to the error resolution?


  • Attach your workbook, it is impossible to say what is wrong without seeing the workbook structure and the ciode.

    We now have a reputation system in place. If my reply helped please "Like" the reply by clicking the "Like" icon at bottom right of my reply.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!