Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
excelFan
 
Posts: n/a
Default separator of thousands

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(VL OOKUP(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
  #2   Report Post  
Frank Kabel
 
Posts: n/a
Default

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")

"excelFan" wrote:

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(VL OOKUP(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

  #3   Report Post  
excelFan
 
Posts: n/a
Default

Thanks Frank for your help
=text(vlookup(A1,A3:B18,2),"#,##0)
works very fine, thanks again

"Frank Kabel" wrote:

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")

"excelFan" wrote:

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(VL OOKUP(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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"