Return Random Cell From Range
Apr 7, 2008
I want to create a button so when you press it, it will pick a random cell and display the info. Similar to the same sort of thing as a 'tip of the day' button you see on so many websites. I have a formula that kind of works from this site, but only when you make changes on a sheet or each time you load it up. I have tried to assign it to a button/picture but with no luck!
View 4 Replies
ADVERTISEMENT
Aug 27, 2012
I have a column (B) of randomly generated numbers 1-14, and am using this formula range to sort in descending order and return the relevant value from column (c).
=VLOOKUP(LARGE(B3:B20,1),B3:C20,2,) to =VLOOKUP(LARGE(B3:B20,14),B3:C20,2,)
Works great, except when a number is duplicated, (E.G. 14,13,13,12,11,10,10,9,8 etc). It then returns the first value from(C) repeated, and not the value from the second and subsequent duplicated reference numbers.
View 3 Replies
View Related
Jun 3, 2014
I am trying to find out how many weeks our current inventory will support our sales. I am trying to research formulas that will do this, and coming back with things like OFFSET, MATCH, INDEX but am not certain the best way to put them together to get what I need. I use excel daily, but this is a bit mroe advanced than I am used to
Mini.xlsx
Starting in cell B4, I would like to count how many weeks of Demand can be covered by the specific Available On Hands in row 3 for that week, put the number of "Weeks Covered" into cell B2, and then fill over to the right in row 2. Right now, the values in row 2 are from my own manual calculations, but I would like a dynamic formula that will sum up the values in row 4 up to (but not greater than) the value in B3, give the count of cells that reached that sum (or even better with decimals to show the percentage covered), which I will copy over into B3:B13. Not sure if that makes sense, or if I can explain in a better way. The yellow cells are what I am trying to create a formula for and am currently stuck.
View 6 Replies
View Related
Feb 12, 2009
My objective is to take two different random counts of numbers written in column b, ranging from B9:B66. However I want to highlight the specific fields listed in the example below, and pull random numbers from those selected fields only. Then I want to pull another set of random numbers in the same column B9:B66, however using a different specific set of fields within column B; as shown in the second random formula string. Use the Press 9 feature to randomly select the two different numbers. What this attempt is trying accommplish is selecting one boy, one girl who have assigned numbers adjacent to their names(name field populated in column c).
What am I doing in correctly?
HTML Formula written to B70
=INDEX(B9:B66,RANDBETWEEN(1,COUNTA(B9,B13,B15,B16,B17,B20,B21,B23,B25,B31,B33,B34,B35,B37,B38,B39,B41,B42,B44,B45,B47,B50,B51,B52)),1)
Formula written to B72
=INDEX(B9:B66,RANDBETWEEN(1,COUNTA(B10,B11,B12,B14,B18,B19,B22,B24,B26,B27,B28,B29,B30,B32,B36,B40,B43,B46,B48,B49,B53,B54,B55,B56)),1)
View 9 Replies
View Related
May 21, 2014
I have created the bulk of the worksheet, and I am now on the summary page. My challenge for the summary is looking up when someone's name appears in Column A on any of the sheets, then summing the hours per week that the person worked.
The main sheets are to track hours, and billable dollars per project, but the summary is to track total hours per team member per week to make sure staff is being full utilized.
In the examples I have attached Aaron's summary should have 13 hrs per week listed. I do not have the foggiest clue how to do a lookup on a name when the position and sheet is random, and return a value summed for each week.
On the summary sheet I did copy rows 1&2 so at least the summary columns match the sheets.
Example 1 is a sample of the detail on 1 of the 5 sheets that in this example could contain Aaron's name in any random place in column A. Example 2 is my hope for the summary page, that will sum those random hours per week matching the headers on the Detailed sheets.
View 1 Replies
View Related
Feb 9, 2014
How to create a sheet to generate Random numbers from 2 specific list of a main list range of 36 Numbers. (List A = Specific 15 numbers, List B = The remaining Numbers from these 36)
Example :
-The Main List Range is from Number 01 to 36
-The Specific random list will be 15 Numbers of these 36
List A-. The Specific 15 Numbers are: 01,02,03,10,11,12,13,20,21,22,23,30,31,32,33
List B-. Remaining Numbers : 04,05,06,07,08,09,14,15,16,17,18,19,24,25,26,27,28,29,34,35,36
So
I need to generate ONE Unique Random Numbers of List A ( 01,02,03,10,11,12,13,20,21,22,23,30,31,32,33)
In Cell A1
In Cell A2
In Cell A3
And from List B, (04,05,06,07,08,09,14,15,16,17,18,19,24,25,26,27,28,29,34,35,36)
I need to do the same thing In
Cell A4
Cell A5
Cell A6
It's possible to have a 6 cells with random but Unique Digits? (not repeated numbers between the 6 cell ??)
View 2 Replies
View Related
Dec 12, 2012
i want to match a cell data with a range of cells and if matches return the cell reference in another cell
View 3 Replies
View Related
Jul 2, 2012
I have a range of cells each containing a name. Based on a number that has to be entered manually I want excel to return the names concatenated in one cell. So for example:
Number of variable entered: 5
q9001
q9002
q9003
q9004
q9005
q9006
etc.
Should give me: "q9001 q9002 q9003 q9004 q9005"
I have been trying to work with formulas using IF and CONCAT functions. But so far I haven't figured out how to have excel return me the correct amount of variables for each separate number that can be entered seeing the number of variables entered can vary from 1 up to 50.
(Using Excel 2010)
View 7 Replies
View Related
Apr 5, 2009
i have a range of cells ( address ) (d16:d21). what i need i16 to do is return the second from last row that has data in it so for example if data is
27 arcacia ave
hillybrook
hills
mountains
london
w4 3rd
it would return the answer london. however if the data was
27 arcacia ave
hillybrook
hills
mountains
View 4 Replies
View Related
Jan 25, 2012
Have a range of data with names dotted in different rows and cells.
I want to find a name, the return the number in the cell to the right.
Can use VLOOKUP as names arent always in same column of the range.
View 9 Replies
View Related
Nov 16, 2008
I have 12 named ranges on a sheet, ArrM1 thru ArrM12.
Each named range is same size, 6 Rows by 7 columns.
Q. If user selects a cell on sheet that is in one of these ranges, what is code to return name of range?
e.g. ArrM1 is cells c10:i15, user selects cell d12; I would like vba to return the name of the range "ArrM1".
Reason, I have the code below so if user selects cell in ArrM1 code is executed, but rather than reproduce code 12 times for each range I thought I could first see where user selects and then change variable for vrange,
Set vrange = wksYearlyCalendar.Range("ArrM1") to
Set vrange = wksYearlyCalendar.Range("ArrM" & x)
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim CalDaySel As String, CalDateSel As String
Dim vrange As Range
Dim cell As Range
View 9 Replies
View Related
Aug 15, 2009
Here is a sample of what I'm working with: ...
View 9 Replies
View Related
Feb 8, 2008
see my attached picture. I am attempting to write a simple Excel Macro that can take the data from the red box and make it into the data in the blue box. Assume that I have a lot of data that will fill up the contents of the red box. I want to run the macro and have the macro output the data, NOW redistributed into the format that is contained in the blue box.
View 5 Replies
View Related
Mar 16, 2014
construct a formula that finds a value in a range , then returns the cell address of that value.
Say, i wanted to find the amount 12385 from another sheet , range C2:AA12 (contains only numbers , no duplicates). result should give me the address of that value.
I have tried the address & match function but gives me an N/A error.
View 3 Replies
View Related
Nov 28, 2012
I am trying to put together a calculation sheet for court costs and I need a cell to return a value based on the amount entered in another cell. For example, if I input a value between 1 and 5 in cell A1, I would like "Cat" to appear in cell A2. However, if I input a value between 6 and 10 in cell A1, I would like "Dog" to appear in cell A2. Is this something that can be done without VB?
For the real spreadsheet, I would need the following outputs in cell A2 based on the respective ranges in cell A1:
Output to A2 = $405 if input to A1 is < $50,000.
Output to A2 = $905 if input to A1 is ≥ $50,000 and < $250,000
Output to A2 = $1,905 if input to A1 is ≥ $250,000
View 3 Replies
View Related
Apr 26, 2009
I want to look up a value in a range of cells and then return a value in a cell in the same row containing the desired value, similar to a vlookup. Except I want to search through several columns for this value and I would like to have it find every occurance of the desired value and return a value in a cell n the same row of each occurance of the desired value.
View 2 Replies
View Related
Nov 14, 2007
when I use the range.find function to find a certain value in a column.. i want to return the address of the cell.. and save it in a range variable. how would I do that?
so this is what i have now.. but Rng does not return as a range.. it returns 69... when i use ctrl + G and type ?rng
set rng = .range(A:A).find(what:=69, After:=.Cells(1, 1), Searchorder:=xlByRows, searchdirection:=xlPrevious)
ok so say it picks up..... cell A69... how do i get it to save range A69
View 9 Replies
View Related
Apr 19, 2009
I have a spreadsheet that has (amongst other things) 2 charts based on dynamic data with ranges that redraw using vb... The charts will draw envelopes that correspond to an aircraft's moment or c of g envelope - there will typically be 2 envelopes drawn, "normal" and "utility" or "aerobatic".
Plotted on the charts are an aircraft's takeoff and landing weights and moment/C of G.
I'd like to be able to use a formula or VB to determine which envelope takeoff/landing information falls in (or if it falls outside all envelopes). This data would then be used to generate an error message/possibly also in conditional formatting, etc.
View 4 Replies
View Related
May 18, 2007
I have a list of ID's on one sheet that are also located in a large matrix on another sheet.
This macro uses the Find_Range function to find each ID within the matrix and return the column header where the ID was first located.
There is also a line which return a list of ranges, indicating all the places where the ID was found.
What I want is to convert the list of ranges into a list of corresponding column headers (ie row 1 of all columns in the range)
' Number of id's in list
RowCnt = Application.WorksheetFunction. CountA(Columns("A"))
For I = 2 To RowCnt
LookFor = Sheets("ID List").Range("A" & I)
Set InRng = Sheets("Matrix").Cells
Set Found = Find_Range(LookFor, InRng, xlValues, xlWhole)
On Error Resume Next ' If value is not found
Sheets("RateID Count").Range("C" & I) = Sheets("Matrix") _
.Cells(1, Range(Found.Address).Column) ' Return column header
Sheets("ID List").Range("D" & I) = Found.Address(False, False) ' Return cell address or range of addresses
On Error Goto 0
Next I
View 9 Replies
View Related
Jun 9, 2008
I have data inputted into cells a-o in rows 1-250. I want to search, lets say row 1, (I do want to search all 250 rows if that info is relevant!) and if cell m is blank then I want to return all the info from row 1 into row 260. If there IS data in cell m then I want to return nothing. Bottom line I want to return all the data in all the rows that contains nothing in cell m.
View 3 Replies
View Related
Dec 30, 2007
We get several sets of season tickets to various events to be distributed amongst several managers based on the mgr's headcount. So mgr1 may get 20 dates while mgr2 gets 5. All this info is calculated on Sheet1, but the only info that is important for this exercise is the mgr's names and how many dates they get. Available Dates will always be the same as Total Headcount.
Short of writing names on sheets of paper and drawing names from a hat, I would like to automate this process w/ a push of a button.
Sheet1 - this is where the managers are listed and their Headcount is calculated.
B C
10| Mgr1 Mgr2
12| 20 5
Sheet2 - this is where my ticket information is listed and will change based on different events.
A. B. C. D.
1| Date Row Seat Mgr
2| 1/1/08 H. 1-4. Mgr1 (20 times)
3| 1/1/08. I. 1-4. Mgr2 (5 times)
Ideally I would like to place a button on Sheet1 or 2 that would execute a code that looks at the range of Mgr's names and based on their hdct, inserts their name THAT many times in column D of Sheet2 like the above example.
This information should not change once it's assigned or unless the button is pushed again. The number of Mgr's names in the row on Sheet1 will change, but is never be more than 15, so the code must skip over cells that are blank if referencing, for ex. B11:P11.
View 9 Replies
View Related
May 15, 2012
So I'm trying to merge some of the information found within two separate worksheets. I'm working with a list of ID#s that may or may not be found on both worksheets, and in a column on Worksheet1 I want to put some of the information found for the corresponding ID# on Worksheet2.
Now I've figured out how to check if an ID# on Worksheet1 exists within a column in Worksheet2 using the formula:
IF(COUNTIF('WORKSHEET2'!$A:$A,A2)0,"MATCH","NO MATCH")
(Excuse the syntax errors if they exist, I'm doing this off the top of my head for expediency)
However, instead of returning the word "Match" if it does indeed exist on Worksheet2, I would like to return the value found in Column E, on the row of the matched ID#, in Worksheet2.
View 6 Replies
View Related
Jan 22, 2014
I need to lookup to search a range on a different sheet and return the appropriate corresponding cell.
Basically its if a1 is found in the other sheets range a1:a100 then return the corresponding Bcolumn value from the different sheet.
Formula
=VLOOKUP(A2,'All Users'!A$2:A$100,'All Users'!B!2:B!100)
Example of 'All Users' Sheet
A B
STAFFIDSTAFFNAME
24177John
10487Paul
20031George
84087Ringo
85772Pete
24485Stuart
3829George
51836Yoko
View 3 Replies
View Related
Jan 31, 2014
I have a table that has a number of new starters and corresponding appointments offered, what I originally required was to lookup the chronological date after the new start date.
However this has now been scuppered by my boss who has requested that not only lookup the date, but also add who the appointment is with, but if I do this the first array formula stops working and to tell the trust I'm not to sure how to do it anyway.
View 3 Replies
View Related
Apr 6, 2012
I am looking for a formula that will enable me to determine which one out of five thresholds a percentage falls within and the retuns a specific value for the corresponding threshold. Here is an example of the data (only showing three thresholds):
_____A________B_________C____
1 ___0.0%_____50%_____$5.00
2 ___51%______75%_____$15.00
3 ___76%_____100% ____$25.00
Where the values in A1 and B1 are the low and high ends of one range. I would like the formula to determine which range the value falls within and return the value in collumn C (C1 for the A1:B1 range).
I can do this using multiple 'if' statements, but am looking for a much more streamlined way to determine the proper value in column C.
View 2 Replies
View Related
Dec 12, 2012
Here is a sample of database,
A
1
Jan-12
2
Feb-12
3
Mar-12
4
Apr-12
5
May-12
6
Jun-12
7
Jul-12
8
Aug-12
9
Sep-12
10
Oct-12
11
Nov-12
12
Dec-12
If i lookup a value in the range A1:A12, say Sep-12, i need to get the cell address instead of the value of the row. but i know how to get cell address using CELL function. but i need to get cell address when i lookup the value.because lookup value will be dynamic.
View 5 Replies
View Related
Feb 15, 2010
I've posted this query before, not on this forum, but I don't think the replies I've had so far are going to do what I want. Initially I was looking for a formula, but the suggested pile of nested IFs won't work for the number of conditions. I saw a previous post on here for a VBA macro to search for a text value in a cell against the cell contents of a range and it seemed to do at least the first part of what I wanted. I attempted to manipulate it a little to test its applicability for my own nefarious purposes but for the life of me I can't get it working.
This is complicated by the fact that the actual data is commercially confidential, so I can't show you the actual file, but I can fake what I want with two simpler ones. I've attached them to this post. What I want is a fair bit more complex than the other post I found - I want to be able to compare a partial text string from a given cell in a range ('Check Value' in the attached TestBook2 ) against the strings in a range of cells ('Value 1' in TestBook1), and return the corresponding value from 'Test Value' to the corresponding adjacent cell to the tested 'Check Value', with an order of precedence, for example...
Testbook2 contains an entry in C5 of 'a, e, h, z, x, y'. Testbook1 shows that the return for a, b, c, or d is 'moo', for e, f, or g is 'steve' and for g through q is 'fred', all others being no returned value. Moo>steve>fred, so I want the corresponding 'moo, steve. fred or <blank>' cell to contain 'moo'. Conversely, C6 contains 't, u, z' and therefore shouldn't have a value in 'moo, steve, fred or <blank>'. C12 contains 'f, z, s, y, u' and C15 'i, x, z, s', and therefore should display 'steve' and 'fred' respectively.
View 3 Replies
View Related
Mar 14, 2014
I would like to use the random function on a range of select numbers. I tried randbetween() but it won't work for me since my range of numbers are not in sequence (e.g. 1,2,4,6,7,8,9,10,21). Using randbetween() might result in numbers not within my range..
View 2 Replies
View Related
Aug 28, 2013
I have range of data where i want to randomly select a value in that range but what i want is to visually see it activating random cells and then finally select 1 at the end. Its just more of a nice visual effect and then select a value/cell.
This code just goes through all the cells but not exactly what i want to do.
Code:
Sub test()
Dim ws As Worksheet
Dim cell As Range
Set ws = Sheets("Sheet1")
For Each cell In ws.Range("Data")
cell.Activate
Next cell
End Sub
View 5 Replies
View Related
Feb 27, 2012
The formula has to include a range across each row (for each student). The formula has to search for specific text contained in the classnames, and then return the result along the same row.
Below is an example, which I hope saves OK in the thread. If not I'll upload an Excel file:
A B C D Results:-
1 class1 class2 class3 class4 Gg Hi Fr Sp
2 10m/Gg1 10m/Hi2 10m/Fr1 10m/En1 TRUE TRUE TRUE FALSE
3 10n/Hi1 10n/En2 10n/Sp1 10n/Ma1 FALSE TRUE FALSE TRUE
View 14 Replies
View Related