Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bob
 
Posts: n/a
Default Help with leading Zeros when running Macro

Having a problem with formatting leading zeros. I am running a macro
that calculates RAND() and RANK then returns a 2 digit number in Col Y
and another 2 digit in Col Z with whichever 2 digit number is ranked 1
then I do a Sum with this formula =LARGE((Z29:Z84),1) then try to join
both 2 digit numbers with this formula
=LARGE((Y85:Y86),1)&LARGE((Z85:Z86),1) my macro calculates and then
copies and pastes results to Col A 25 times but I can not get leading
zeros to show no matter how I try to format col Y or col Z or col A Can
anyone help me with this. It is driving me nuts!!!!!

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
 
Posts: n/a
Default Help with leading Zeros when running Macro

Try either

=--(LARGE(Y85:Y86,1)&LARGE(Z85:Z86,1))

and use a custom format of 0000
or if you don't need to do any calculations with the numbers

=TEXT(LARGE(Y85:Y86,1)&LARGE(Z85:Z86,1),"0000")

you had some extra parenthesis btw

--

Regards,

Peo Sjoblom

Northwest Excel Solutions

www.nwexcelsolutions.com

(remove ^^ from email address)

Portland, Oregon




"bob" wrote in message
oups.com...
Having a problem with formatting leading zeros. I am running a macro
that calculates RAND() and RANK then returns a 2 digit number in Col Y
and another 2 digit in Col Z with whichever 2 digit number is ranked 1
then I do a Sum with this formula =LARGE((Z29:Z84),1) then try to join
both 2 digit numbers with this formula
=LARGE((Y85:Y86),1)&LARGE((Z85:Z86),1) my macro calculates and then
copies and pastes results to Col A 25 times but I can not get leading
zeros to show no matter how I try to format col Y or col Z or col A Can
anyone help me with this. It is driving me nuts!!!!!


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bob
 
Posts: n/a
Default Help with leading Zeros when running Macro

thanks works great...

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
leading zeros in text format BigBrook Excel Discussion (Misc queries) 5 December 11th 08 08:00 PM
Concatenation with leading zeros Laura K Excel Worksheet Functions 6 August 27th 05 11:55 PM
CSV File - Leading Zeros Floridagal Excel Discussion (Misc queries) 2 August 6th 05 12:34 AM
Leading Zeros with a twist. Steve D Excel Discussion (Misc queries) 1 July 30th 05 01:28 AM
zero supress leading zeros when chg format from text to number HeatherO Excel Worksheet Functions 4 February 27th 05 11:11 PM


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

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"