ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Vlookup and adding text (https://www.excelbanter.com/excel-discussion-misc-queries/140910-vlookup-adding-text.html)

confused

Vlookup and adding text
 
How would I write the vlookup formula where, if vlookup formula returns a
number, then I want the number to include "/ month" after it. If the vlookup
does not return a value, then I want to show a blank. For example, my
vlookup formula is vlookup(B2,database,3,false) returns 4,031. I want the
cell to read "4,031 / month" .

any help is much appreciated. Thanks

T. Valko

Vlookup and adding text
 
Try this:

=IF(ISNUMBER(MATCH(B2,INDEX(database,,1),0)),
VLOOKUP(B2,database,3,0)&" / month","")

Biff

"Confused" wrote in message
...
How would I write the vlookup formula where, if vlookup formula returns a
number, then I want the number to include "/ month" after it. If the
vlookup
does not return a value, then I want to show a blank. For example, my
vlookup formula is vlookup(B2,database,3,false) returns 4,031. I want the
cell to read "4,031 / month" .

any help is much appreciated. Thanks




confused

Vlookup and adding text
 
the formula works great. But just one more thing, the value that is return
is 4031 / month. how do I get it to show $4,031 / month?

Thanks

"Confused" wrote:

How would I write the vlookup formula where, if vlookup formula returns a
number, then I want the number to include "/ month" after it. If the vlookup
does not return a value, then I want to show a blank. For example, my
vlookup formula is vlookup(B2,database,3,false) returns 4,031. I want the
cell to read "4,031 / month" .

any help is much appreciated. Thanks


T. Valko

Vlookup and adding text
 
Try this:

=IF(ISNUMBER(MATCH(B2,INDEX(database,,1),0)),
TEXT(VLOOKUP(B2,database,3,0),"$#,###")&" / month","")

Biff

"Confused" wrote in message
...
the formula works great. But just one more thing, the value that is
return
is 4031 / month. how do I get it to show $4,031 / month?

Thanks

"Confused" wrote:

How would I write the vlookup formula where, if vlookup formula returns a
number, then I want the number to include "/ month" after it. If the
vlookup
does not return a value, then I want to show a blank. For example, my
vlookup formula is vlookup(B2,database,3,false) returns 4,031. I want
the
cell to read "4,031 / month" .

any help is much appreciated. Thanks





All times are GMT +1. The time now is 07:07 PM.

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