Returning A Range Of Cells?
Jun 3, 2009
Just for fun (and a massive headache) - I am trying to do the following
=IF(INDIRECT("'"&$Q$1&"'!E2")="Table",IF(INDIRECT("'"&$Q$1&"'!H2")="Yes","Graph","Table"),IF(INDIREC T("'"&$Q$1&"'!E2")="Descriptive",INDIRECT("'"&$Q$1&"'!J2")," "))
Where Q1 is the name of the worksheet I want to access.
Where E2 is the type of information I am trying to display (Table or Descriptive)
Where H2 is if it needs a Graph or Not
Where J2 is a comments field
What I am wondering is if the following values are set
Q1= May-09
E2 = Table
H2 = No
How can I get it to return the information contained between cells P2 to S3 on worksheet May-09
View 3 Replies
ADVERTISEMENT
Jan 8, 2008
I have a long range of cells (U3:AX3), all of which are empty save one. Is there a way to search through the range of cells, and return the contents of the one cell that contains text?
I would do this with a series of nested IF statements if there weren't more than 30 of them!
View 9 Replies
View Related
Apr 25, 2014
I want to be able to return the value of the last non-blank cell in the horizontal range L3:BF3. This would need to account for any blank cells that might occur within the range. Those 'blank' cells would contain formulae and the non-blank cells would contain GCSE grades from A* down to U or National Curriculum levels in the format nx (e.g. 3a). I would need to be able to copy the formula down to other rows. The reason I'm not keen on an array formula is because they can slow things down, as I understand it.
I'm afraid I don't have a sample worksheet as this is all, for now at least, an emerging plan in my head. I should probably add that the grades will not necessarily increase in value in the range, so we're not looking for the largest.
View 10 Replies
View Related
Jul 28, 2014
I am trying to set up a query to search a date range within a table in one sheet based upon a more narrow date range in a second sheet AND return a simple count, median currency value or value based upon a ratio (see attachment).
Note: the Sale Price, List Price and Supply values will be based upon the filtered date range (each quarter) and return a value based upon that range. The Sale Price and List Price also need to be a median within each quarter value so I can chart the data.
Help.pdf
Here is what I need to return:
Num Sales - simple count from each quarter
Num Listings - simple count from each quarter
Sales Price - median value within each queried date range
List Price - median value within each queried date range
Supply - numeric value based upon absorption rate, supply = listings each quarter / absorption rate (absorption rate = sales each quarter / months each quarter)
View 5 Replies
View Related
Jul 5, 2012
I have a row of upto 20 numerical entries, (1,1,2,2,10,10,3,3,4,5,6,7,8,12,1,1,7,8,9,11) what formula do I use to go about getting excel to return the two highest numbers?
In this example I'd want excel to return the numbers, 12 and 11
View 1 Replies
View Related
Jun 6, 2014
Store 1
Store 2
Store 3
Store 4
Top Selling
Second
Third
Fourth
[code]....
I am trying to find two formulas:
Formula 1: Formula 1 will be entered into rows 6:9 (in this example). I need it to return the highest selling product (by store) in order form highest selling to lowest selling. I have a makeshift formula already but it cannot report in order (only the highest selling) and it cannot get past the one return index( limitation. When it finds two high sellers it prioritizes the ranking based on how well that product has sold across the other stores. Product 1 sold 13 times across all stores. Product 2 sold 9 times across all stores. So if product 1 & 2 tie for Store 3 (as shown in the example) Product 1 would be chosen based on its sales across the row.
Formula 2 : Same as formula 1 but with Stores (in column 6-9). It reports the highest selling store and treats ties the same way as formula 1.
View 4 Replies
View Related
Apr 30, 2008
The purpose of my code is to time production cycles for heavy equipment. There are five - six segments in the cycle, and it's possible that not every segment is included in each cycle. It's also possible that the cycle will not go in sequential order.
Here's a snippet of
Sub MacroD()
Dim LR As Long
LR = Range("D" & Rows.Count).End(xlUp).Row + 1
ActiveSheet.Unprotect
Range("D18:D" & LR).Value = Now
UserForm1.ListBox1.Text = "Time"
UserForm1.ListBox1.SetFocus
' UserForm1.Show
End Sub
Sub MacroF()
Dim LR As Long
LR = Range("F" & Rows.Count).End(xlUp).Row + 1
ActiveSheet.Unprotect
Range("F18:F" & LR).Value = Now
UserForm1.ListBox1.Text = "Time"
UserForm1.ListBox1.SetFocus
' UserForm1.Show
End Sub
My problem is that when the macro runs, it returns the time in more than one row and overwrites the previous timestamp. It starts in row 17, and will record the first time in 17 and 18. When the macro is run again, the time will be recorded in 18 and 19. When it's run a third time, the timestamp is recorded in 18, 19, and 20. So essentially, I'm losing all of my previously recorded data. When I finish, all I have left is the timestamp in row 17 and whatever the last time recorded is.
View 13 Replies
View Related
Jun 7, 2006
I am trying to create an advanced filter that filters my results into a row.
e.g.
Shane
Shane
Tom
Tom
Paul
Mike
would return
Shane Tom Paul Mike
I have tried changing this piece of code
Range("M1:M300").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Columns("M:M"), CopyToRange:=Rows("25:25"), Unique:=True
The problem is with
CopyToRange:=Rows("25:25")
I have tried using Range instead of Rows but I am not having any joy.
View 4 Replies
View Related
Jun 9, 2014
I'm trying to match and make judgement for my excel file and return as "OK" or "NG"
Eg.: New Picture.png
View 6 Replies
View Related
Mar 14, 2009
I am trying to use lookup to return the value when the condition of two cells are met.....
View 10 Replies
View Related
Jun 28, 2007
Joe Cheddar 1 2 1
Juan Valdez 1 3 2
Sam Vidal 1 1 2
Betty Juno 2 4 2
...there is only one "1" in a column. So if column 1 has three ones it doesn't return anything. Columns 2 and 3 though have only one occurance of "1." What I need returned is for column two, "Sam Vidal", and for column three, "Joe Cheddar." Column one would show "No Winner"
View 13 Replies
View Related
Oct 31, 2011
I have a column of formulas I'm trying to sum. The SUM function gives me zero.
The formulas are simply pointing to another place in the spreadsheet so the contents of the column look like this:
=D11 (And it displays what's in D11... $1432 etc etc)
=D28
=D30
When I sum those I get Zero. Is there a better way to do this? All cells are formatted as currency
Also... cell D11 is actually a sum of different cells. (As are the rest of them) So I guess what I'm saying is that I'm trying to display the value in cell D11 and D28 and D30 and sum up the total.
View 7 Replies
View Related
Nov 26, 2009
I have a problem with a calculation i am trying to do. I have to calculate holiday allocation for staff but i my company also offers length of service bonus days. After 5 years you get 1 extra day, after 10 years you get 2, after 15 you get 3 and so on. In my sheet i have a formula based on their start date that tells me their length of service in the following format: 10 years, 2 months.
I have put an IF Statement in for each of the different milestone criteria but the result is not coming back so i know i am missing something. Is there something wrong with the formula itself or is there a better one that will allow me to put the start and end of the range i want it to look at? For example can i tell it to say if between 5 years and 9 years 11 months put 1, if between 10 years and 14 years 11 months put 2 etc in column H.
View 3 Replies
View Related
Apr 24, 2014
I'm attempting to match a name with the row and column numbers of data that is laid out in a grid format. It looks something like this:
Denson
Matthews
Smith
[Code]....
This works just fine, except for the fact that once in awhile the same name will appear in the grid twice, and the row and column returned will be off (it will return the row for one of the Smiths, for example, and the column for the other).
I know why this is occurring so I'm looking for a better way to do this. The good part is that I don't necessarily need both locations returned for each "Smith" ; I just need the correct row and column for at least one of the instances. I'm looking for a better way to do this.
View 1 Replies
View Related
Dec 31, 2009
For some reason get a type mismatch error on when I try to determine the rth member of summation range. I have highlighted the relevant part of the code in bold. It is strange as I can obtain the address.
If ((All_nurse_names(r, 1) = nurse_name) And (All_status(r, 1) = status)) Then
Debug.Print "test " & r & " " & summation_range(r).Address & " " & val(summation_range(r))
total_hours_in_shift = total_hours_in_shift + (summation_range(r))
End If
View 9 Replies
View Related
Oct 3, 2008
Ok, so I have a column of data in 24hr time format over a 24hr period from noon thru midnight and back to noon again. It has been necessary to make some of the cells in the column blank, and I am having difficulty extracting the first and last non-blank entries of the column (basically I want the earliest and latest time in that specific 24hr period). The time data is in order, so for example, some of the first values in the column are 14:30, 21:10, and 22:40, while some of the last values in the column are 02:20, 05:50, and 11:00, therefore the values I require are 14:30 and 11:00.
Any help that anyone can give on this matter would be greatly appreciated, but until then I guess I will keep plodding through the help sites and playing with formula until I spontaneously combust.
View 6 Replies
View Related
Oct 19, 2007
I have a formula I need to modify.
In column b I have a list of items by number, each one is unique
In column c I have a list of items by number. In this column a item may not be listed or listed 1000's of times.
In column d I have a list dates for each of the items listed in column c
In column e I have a list of prices for each of the items listed in in column c
The idea with the orginal formula was to look up the item and return the date
=MAX(INDEX(($C$2:$C$39999=B2)*(D$2:D$39999), 0))
Now I need to get it to return the most recent date from column d and the dollar amount right next to it from column e. How would I do that?
I trying to return the most recent date and price for a item.
I thought about breaking this into two formulas and having the second formula read the date that was returned from the above formula and the item number from column b and returning the value from e, but got stuck. I was thinking a lookup function with two criteria.
View 6 Replies
View Related
Apr 25, 2007
I am having a bit of a problem writing a formula that works under the specific conditions that I need.
I have a range of 6 cells, A1:A6 which contain text
I have formatting that turns that row red based on specific conditions. The problem is that if A1:A6 is red, I then need the text in those cells to be copied to Sheet 2 B1:B6.
View 9 Replies
View Related
Jun 15, 2012
I have the following code in Destination.xlsm that is intended to:
request the user to select a multi-cell range in a column of single-sheet Source.xlsm, in which some but not all cells contain "Y" (to indicate that this row of data relates to a National Account, versus a Territory Account)loop through the selected range, and whenever a cell contains "Y", copy the entire row and insert it in Destination.xlsm above a cell named "rngDest".
Code:
Sub Copy_NationalAccounts_Rows()
Const Message As String = "Select the entire range containing National Account Y flags, then press Enter or click OK."
Const Title As String = "Copy National Accounts"
Dim rngSource As Range
Dim rngDest As Range
Dim r As Range
Dim c As Integer
Dim wbk As Workbook
[Code] ........
View 5 Replies
View Related
Apr 6, 2014
Referenced cells returning zeros: can these be made blank or string data?
But why I still get the value 0 instead of blank cell when I press ctrl+shift+enter?
My formula = IF(U15="Bank", PROPER(E15),"")
and E15 = VLOOKUP(B15,'Customer Data'!$D$6:$K$100,3,FALSE)
View 5 Replies
View Related
Dec 24, 2008
I'm trying to do a comparison amongst several cells and returning a 1 if true. if D25 is blank or does not equal Yes, Mixed or SP3, and if both F25 and G25 are blank, the output the value 1. First try:
=IF(AND(D21="",D21<>"Mixed",F21="",G21=""),1,"") - This seems to ignore the Mixed and outputs a 1 even if D21=Mixed.
Second try:
=IF(AND(OR(D25<>"Yes",D25<>"Mixed",D25<>"SP3"),F25="",G25=""),1,"") - same as above, if D25=Mixed then value of the cell is 1.
View 2 Replies
View Related
Apr 17, 2013
I am using Multiple worksheets ( 30 to 35 ) of same format to calculate Individual scores of an event. Each sheet contains Participant Name in C4 and Score in E 21.
Macro to provide a summary sheet which returns C4 & E21 in all the sheets..
The score in E21 is calculated thru another macro done with excel recording feature..
View 4 Replies
View Related
May 18, 2009
I have a spreadsheet used for calculating information based on the dates specific shifts are requested/cancelled by our clients. I have a formula for working out if a date & time of cancellation is less than 48hrs notice of the shift starting. This is because we have cancellation fees based on this.
What I have is this formula: =IF(A16="","",IF(INT(A16)-INT(G16)<2,1,"")) that returns a 1 if that shift is cancelled within 48hrs notice. This works fine but I have to now change the notice periods to the following:
72hrs+ - return 1
48hrs-72hrs - return 2
13.5hrs-48hrs - return 3
0-13.5hrs - return 4
edit this formula to take this into account? I figure it's using multiple IF's and changing the <2 into something else like the number of hours but I'm not sure of the exact syntax.
View 4 Replies
View Related
May 22, 2013
I need to return the specific text of a cell based upon the text in multiple cells.
Worksheet as follows:
Asphalt Sub:
BLDG1-Backwash 1
*BLDG1*
*Sub*
BLDG1-Backwash 1 OverEx
*BLDG2*
*Sub*
[Code].....
I have three columns thus far. I need to add another column and search all items in Column A using the criteria in Columns B and C. For instance I need to search for BLDG1-Backwash Sub: and place it into column D using the criteria in Columns B and C.
If possible, I would also like to remove both the words, BLDG1 and Sub from the result so then it only shows "Backwash".
My spreadsheet is much larger than this and I have muliple buildings I am dealing with, sometimes 30-40.
View 4 Replies
View Related
Sep 18, 2013
If I am working from cell (D16), I am looking for a formula to compare the value in 2 different cells (D8 and D12) to a value in a third cell (D14) and the one with the closest value without going over returns a seperate value from either (D7 or D11), But if both D8 and D12 are above the value of (D14) then the closest value would be the answer and return the answer from (D7 or D11).
Example: D7=Bob and D8=25
D11=John and D12= 40
D14= 45
D16 (answer cell) =John
OR:
D7=Bob and D8=46
D11=John and D12=48
D14=45
D16 (answer cell) =Bob
View 2 Replies
View Related
Nov 6, 2009
This is a floowup to the issue that was originally posted as "Returning MAX/MIN values from multiple rows in a named range ". I marked that post as solved since I have worked through part of the issue and since have a different one.
View 2 Replies
View Related
Dec 24, 2013
I have a set of sheets on a workbook that contain addresses, which are all combined on the first sheet (as you can see in the attached file). I would like to use a formula to compare the addresses on the Main sheet with the other sheets, then return in the D column of Main a colored cell indicating on which sheet the address was found on; different colors for different sheets. I tried to figure out some conditional formatting, but to no avail. Also, on occasion I have spreadsheets with 5 or 6 sheets containing these mixed addresses. Is there a solution that won't be limited to just a few sheets for comparison?
Excel Help.xlsx
View 8 Replies
View Related
Apr 8, 2014
I have two Columns C and E that have dollar amounts in them. I want to compare each row in those columns and then total the number in column C that are higher that column E.
So basically C6>E6, C7<E7, C8=E8,C9>E9 should return the result of 2. There are two instances where the price in C is higher than the price in E.
View 3 Replies
View Related
Aug 30, 2007
I have a summary worksheet consisting of columns that are referenced to other sheets within the same workbook.
If the cell in the 'referring' (original) sheet is blank then the forumula returns a zero instead of a blank in my summary worksheet, which is messing up some other calculations.
Is there a way to make these cells truly blank, or possibly into string variables instead, so that they do not interfere with my calculations?
View 13 Replies
View Related
Jan 26, 2010
I've got a list of donor names, names listed multipled times in Column A, each row with different donation data. For instance:
Sheet 1
A1 - Mary Jones, B1- Internet Donation
A2 - Mary Jones, B2 - Silent Auction Purchase
A3 - Mary Jones, B3 - Event Ticket Purchase
A4 - Gary Jones, B4 - Foundation Grant
A5 - Gary Jones, B5 - Internet Donation
A6 - Sara Parker, B6 - Event Ticket Purchase
I want Excel to compare rows A1 and A2, and if the name has not changed, enter the donation data from Column B into another sheet that will just list that person's name once:
Sheet 2
A1 - Mary Jones, B1- Donation1, C1 -Donation2, D1 - Donation3
A2 - Gary Jones, B2 - Donation1, C2 - Donation2, D1 - Donation3 (which would return no value because there the name changes
Does this involve IF, MATCH or VLOOKUP formulas?
View 9 Replies
View Related