separator of thousands

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi all,
my (part) formula = VLOOKUP(A1,A3:B18,2) This will give me (say for
example) 1234567. i like this number to look like 1,234,567 and here what i
did
=IF(LEN(VLOOKUP(A1,A3:B18,2))=7,REPLACE(REPLACE(VLOOKUP(A1,A3:B18,2),2,0,","),6,0,",").
Is there easier way to do that ? Because i have to repeat this process many
times for if (len(A1,A3:B18,2))=4 then =5 and so on up to =12 which i end up
with a too large unfinished formula
thanks for any help
 
Hi
one way: Why not use 'Format - cells' for this?

If you need a formula (but remember the result then is a STRING value) try:
=TEXT(VLOOKUP(A1,A3:B18,2),"#,##0")
 
Thanks Frank for your help
=text(vlookup(A1,A3:B18,2),"#,##0)
works very fine, thanks again
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top