Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
Help with Excel Random Numbers?
I am trying to find out if it is possible to have isolated formulas that DO NOT change everytime I hit ENTER while in another cell.
For Example:
I have 6 cells in Column A. Each cell is set up with the same formula =randbetween(1,6)*3
I do this so it will give me 6 separate random numbers. This works just fine. However, anytime I enter information in another cell that has nothing to do with those 6 numbers the formulas get recalculated. This is a pain when I'm trying to input those 6 numbers into a different field and they keep changing. Anybody know how I can get those formulas not to change when I'm inputing data elsewhere on the sheet?????
3 Answers
- garbo7441Lv 79 years agoFavorite Answer
Here is another approach using a VBA Event handler. The following example assumes the 6 random numbers are to be placed in cells A1:A6. If your cell range is different, replace the "A1:A6" reference with your cell range, i.e. "A5:A10", etc.
Copy the following event handler to the clipboard (highlight the entire event handler, right click inside the highlighted area, and 'Copy'):
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
Cancel As Boolean)
For Each cell In Range("A1:A6")
cell.Value = Application.RoundUp(Rnd() * 6, 0) * 3
Next
End Sub
Select the worksheet use wish to employ this in and right click the sheet tab at the bottom.
Select 'View Code'.
Paste the event handler code into the white editing area to the right (right click inside the area and 'Paste').
Close the VBE (red button w/white 'x')
To create a set of random numbers, simply double click any cell. Notice that the numbers are simply numbers entered in the cells... not formulas. These numbers will remain 'static' until you double click again, which will replace those numbers with a new set.
- Mister AnswermanLv 79 years ago
Whenever you do something in a non-related cell, all formulas are updated in all of the cells in that spreadsheet.
There is an option to not update. right-click toolbar area (not ribbon) and then "Customise Quick Access Toolbar" then Formulas option. Set Workbook Calculation to Manual but you need to press F9 for the random function to work.
- Andrew LLv 79 years ago
To fix the numbers permanently, select them all, copy, paste special -> values.