Saturday, December 26, 2009

How do I add a random number to a list of consecutive numbers in Excel?

I have a list of numbers (barcodes) that I want to add a random number (0-9) to the end of each one. It is a 12 digit number but I want the last and 13th digit to be a random number between 0 and 9. The list goes from A-1 through A-10000 and I just can't figure out how to add the last random digit. I use Excel 2007. THANK YOU!How do I add a random number to a list of consecutive numbers in Excel?
Put this formula in B1


=A1%26amp;RANDBETWEEN(0,9)





Copy B1 and paste it in B2:B1000





This will put a random number (0 to 9) at the end of your 12 digit numbers from column A. You will get a new random number any time the sheet does a calculation or you hit the F9 key. If you want a random number but then you don't want it to generate new random numbers when the sheet calculates, copy colunm B and Paste Special Values to a new column.
  • soccer
  • No comments:

    Post a Comment