ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   inserting text (https://www.excelbanter.com/excel-discussion-misc-queries/37397-inserting-text.html)

Jon1205

inserting text
 
I have a sheet that lists the sales tax of different cities. I want to be
able to inport the specific rate into a cell on another sheet so that it
states

Sales Tax (7.0%)

Is there any way that I can link the percentage to the other sheet so that I
don't have to change it when I change the city in an above cell.

Thanks for any help

Dave O

Yes! Check out the VLOOKUP() function in Help.


carg1


Although it'd be more helpful if you were more specific, how about a
vlookup combined with a concatenation. This will take a little setup.
For this suggestion you'll have to have the workbook with the tax rates
have the city in column A and the rate in B. For this example, we'll
presume the cities and rates occupy cells A1:B50 on that sheet.

So, supposing that's done and the city is in column A and the tax in
column B on your main sheet:

In cell B2:

="Sales Tax ("&vlookup(A2,'[TheOtherBook]Sheet1'!$A$1:$B$50,2,0)&"%)"

You can omit the % symbol if you already have it on the rates in the
other workbook.


--
carg1
------------------------------------------------------------------------
carg1's Profile: http://www.excelforum.com/member.php...o&userid=15271
View this thread: http://www.excelforum.com/showthread...hreadid=390748


Jon1205

I tried that. The equation that I used was:

="Sales Tax (vlookup(tax,indirect('&$C$1&'!A2:B17),2,False))"

It just prints everything in quotation marks. If I just use the vlookup
function it will return the 7%, but I would like it to return "Sales Tax (7%)"

Is That possible?
Thanks

"Dave O" wrote:

Yes! Check out the VLOOKUP() function in Help.



CLR

Try this......... ="Sales Tax
("&vlookup(tax,indirect('&$C$1&'!A2:B17),2,False)& ")"

Vaya con Dios,
Chuck, CABGx3


"Jon1205" wrote in message
...
I tried that. The equation that I used was:

="Sales Tax (vlookup(tax,indirect('&$C$1&'!A2:B17),2,False))"

It just prints everything in quotation marks. If I just use the vlookup
function it will return the 7%, but I would like it to return "Sales Tax

(7%)"

Is That possible?
Thanks

"Dave O" wrote:

Yes! Check out the VLOOKUP() function in Help.





Jon1205

Thanks carg1. That is exactly what I wanted.

"carg1" wrote:


Although it'd be more helpful if you were more specific, how about a
vlookup combined with a concatenation. This will take a little setup.
For this suggestion you'll have to have the workbook with the tax rates
have the city in column A and the rate in B. For this example, we'll
presume the cities and rates occupy cells A1:B50 on that sheet.

So, supposing that's done and the city is in column A and the tax in
column B on your main sheet:

In cell B2:

="Sales Tax ("&vlookup(A2,'[TheOtherBook]Sheet1'!$A$1:$B$50,2,0)&"%)"

You can omit the % symbol if you already have it on the rates in the
other workbook.


--
carg1
------------------------------------------------------------------------
carg1's Profile: http://www.excelforum.com/member.php...o&userid=15271
View this thread: http://www.excelforum.com/showthread...hreadid=390748



carg1


No prob, glad to help :)


--
carg1
------------------------------------------------------------------------
carg1's Profile: http://www.excelforum.com/member.php...o&userid=15271
View this thread: http://www.excelforum.com/showthread...hreadid=390748



All times are GMT +1. The time now is 04:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com