How do I use variables in Excel?
How Can I accomplish this, say this is field A1:
The %product% only costs %price%. Order today, we only have %qty% left! -------------- Obvoiusly the words enclosed in % % are the variables that I want replaced. Is there way that I can make fields B, C, and D equal the corresponding variables? For example, B1= Dog collar C1= $9.99 D1= 20 So then A1 becomes: The dog collar only costs $9.99. Order today, we only have 20 left! I'm open to trying ANY method that can allow me to use variables in Excel. Thanks. |
Okay.
="The "&b1&" only costs "&c1&". Order today, we only have "&d1&"!" :) ******************* ~Anne Troy www.OfficeArticles.com "XUT67" wrote in message ... How Can I accomplish this, say this is field A1: The %product% only costs %price%. Order today, we only have %qty% left! -------------- Obvoiusly the words enclosed in % % are the variables that I want replaced. Is there way that I can make fields B, C, and D equal the corresponding variables? For example, B1= Dog collar C1= $9.99 D1= 20 So then A1 becomes: The dog collar only costs $9.99. Order today, we only have 20 left! I'm open to trying ANY method that can allow me to use variables in Excel. Thanks. -- XUT67 |
You can refer to A1, B1 etc. as Anne shows, but you could also use named
ranges. Insertnamedefine on a cell, you can call it something that makes more sense like "price", "qty" etc. Then in your formula you just say: ="The "&product&" is not in stock, but we have "&qty&" on order." "XUT67" wrote in message ... How Can I accomplish this, say this is field A1: The %product% only costs %price%. Order today, we only have %qty% left! -------------- Obvoiusly the words enclosed in % % are the variables that I want replaced. Is there way that I can make fields B, C, and D equal the corresponding variables? For example, B1= Dog collar C1= $9.99 D1= 20 So then A1 becomes: The dog collar only costs $9.99. Order today, we only have 20 left! I'm open to trying ANY method that can allow me to use variables in Excel. Thanks. -- XUT67 |
All times are GMT +1. The time now is 09:17 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com