Formula To Compare Sum Of Range To Cell Value And Return Cell Count Of Range Used

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.

I have two Date range in different cell and I want them two return "TRUE" value even if the start time or end time of another is earlier or later by 1-2 hours:

Example: I want to Compare Data from Cell A to B. Values should return True as it is within 1-2 hour range.

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):

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.

if I have a range, say 33-35, I want to put a value into a cell and compare it to that range. It will set another cell to a certain value, based on the range.

i.e. if (35 > A1 > 33) A2 = B elseif (37 > A1 > 35) A2 = X

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.

I need a formula that will return the minimum value from a column range that flexs without having to manually go in an change row references. There is a blank row between each section of data in order to separate info. As an example:....

Need to formula to flex to include rows 5 thru 7 in the first section but expand to include rows 9 thru 13 in the second section. =MIN(A5.A7) works but how do I get next section to flex to =MIN(A9.A13) without manually changing the cell references? There is always a blank row in between the sections to separate.

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:

(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.

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

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.

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!

I am trying to count words in seperate rows,columns in a spreadsheet. I have tried to use the formula that was suggested in one of the formula pages but I did not get the correct answer. I tried to do just like the information said with a1:a5. I did get 5 as an answer but when I deleted one of the words it still said there were 5 words.

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.

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

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.

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

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.

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

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.