To get a random number in Excel, use the
RAND() function, which returns a random number between 0 and 1. It will return a different random number each time the cell is recalculated, such as when you reopen the workbook (e.g. press F9 to refresh and you'll see the value change).
Random Numbers In a Specified Range
To get a random integer (i.e. whole number) in a particular interval, use the
RANDBETWEEN() function, which has two inputs noting the lowest and highest values you want random numbers between. E.g.
=RANDBETWEEN(200,300) will return a random integer between 200 and 300. Again you'll get a new random number each time you refresh (you can Copy and Paste Values if you want to keep the random numbers you've generated).
If you need a random number in an interval which isn't rounded to the nearest whole number, you can use the RAND() function output to do get this. For example,
=200 + RAND() * (300-200) will give you a random number between 200 and 300 which isn't rounded.
The output from each of these functions is shown in the below output:
Working with dates can be a key thing in Excel. This tutorial gives you a few different ways to get the current date in Excel 2003, Excel 2007 and Excel 2010.
The NOW() function
One way to get the date is using the function
=NOW() which just puts the current date and time in to the cell as follows:
You can then format the cell (right click -> Format Cell, or Press Ctrl+1) to display it as you like, for example as a date in the format dd/mm/yyyy. Continue reading
This is quite a simple tutorial, but can help make your Excel 2007 or Excel 2010 spreadsheets more attractive if used sparingly. You can set the colours of cell borders by following these steps.
- Select the cell you want to colour in.
Slightly off topic post for this blog, but I'd like to share my experiences of moving a blog from Movable Type 4 to WordPress 3.4 blogging software.
The reason I chose to switch was that, while MovableType produces static web pages which are quick to load on a slow webserver, the interface felt too cluttered - almost like it is trying to do too many things. To top it off, it was suggesting that I link to certain "promoted" sites which is an immediate turn off.
I've exported from MovableType in the past, and encountered a few issues, but this time seemed to go much smoother. Perhaps it is partly due to having a smaller blog, or perhaps the process has improved. This article has a guide showing the steps I followed to move all my posts across to a fresh install of WordPress.
If you came here looking for an easy short-cut key to paste values in Excel then it's bad news I'm afraid - there just isn't a simple keyboard shortcut in the same way there is to cut, copy or paste normally. However there is a way to paste values using the keyboard, which this tip shares with you.
If you press Alt in Excel, you may have noticed that Excel puts letters on the ribbon, indicating the Alt key associated with that tab or function. If you press Alt, then press the letter for the tab you want (e.g. H is the home tab), you can then choose the function you want from that tab (e.g. C for copy, V for paste), and so on. Some items, including paste, have further sub-items which you can select by stringing these letters together.
So to get to paste values this way, you can do the following0: Alt - H - V - V. Just press each one in time, no need to keep any key pressed.
The option to require a password to open an Excel spreadsheet may be in a different place than you are used to in earlier versions of Excel. Follow the steps below to require a password to protect your spreadsheet.
- Choose File -> Save As.
Excel 2007 and Excel 2010 make it easy to convert between different units, such as temperatures using the CONVERT() function.
It is used as follows:
=CONVERT(number, from_unit, to_unit).
The option to give people a prompt that open an Excel spreadsheet recommending them to open it as 'read only' is in a slightly different place in Excel 2007 and Excel 2010 than it was in earlier versions. Follow the steps below to find it.
- Choose File -> Save As.
If you want to connect a portable USB hard drive to an Xbox 360 or PS3, you'll need to format it as FAT32. Unfortunately, Microsoft no longer offers this as option in Windows for formatting drives larger than 32GB. There are third party tools available to do the job though, and the following instructions explain how to use them. Follow with care though, or you could lose important information on your computer. (Also please be aware that formatting a drive will delete everything on it.)
It can save a lot of time to upload a single file to your web server then extract it, rather than extracting to your own computer and uploading the contents.
Assuming you've managed to upload the file to your server (e.g. using FTP), and connect via SSH to a unix server (PuTTY is a good client), follow these steps to extract it.
- Navigate to the directory containing your file. Use the command
cd (change directory), for example:
cd MyDirectory. You can use
ls to view the files in each folder.
- Use the unzip command to extract:
unzip MyZipFile.zip. Type
unzip by itself to find out more about it, including various options for using it.
- If you want to move the files you've just extracted, you can use the
mv command. If the files have been extracted to a subfolder and you want them out, try
mv MyZipFile/* . (the dot indicates the current folder).
- Finally, you can delete the zip file if you don't need it anymore by