Calculated Column for Adjacent Cells of a Specific Value in Spotfire - calculated-columns

I am wondering if it is possible to create a calculated column that will count how many cells of the same value (and only this value) are successive (i.e., next to each other) so that I can divide it by the total number of cells in that column. Any help or advice would be greatly appreciated as I've been scratching my head over this for a while. This is an update to a previous question I posted (link below)
This new question has the key differences below:
(1) I only want to count the number of "Blue" cells that are adjacent to other "Blue" cells
(2) I would like to do this for (over) each Site
Previous question is here: Number of Successive Cells of a Same Value in Spotfire

You'll need to insert your RowID column again, but after that this formula will work for you. You can test by making SiteB, Depth 1 = Blue so that you have two "Blues" touching that are in different sites.
If(([Color]="Blue") and
(([Color]=First([Color]) over (Intersect([Site],Next([rid]))))
or
([Color]=First([Color]) over (Intersect([Site],Previous([rid]))))),1,0)

Related

Appending keyed row values in column chunks in Excel

Problem: I have multiple rows with unique organizations and if a unique row's column reaches the second name/last/email I want those values (in green) to be appended below the first (in blue) as seen in "what I want". Some rows may only have data up to email_1 and others may have both (up to email_2). I've tried looking for solutions but I can't find anything near what I need.
I can solve this with python but I'm trying to use excel formulas only. Need a little help! Thanks!
If your column maximum limit is upto email_2 means columns reach upto email_2 with unique row then i can help you in this regards using formula.use following steps.
paste first_2, lastname_2 etc column in above first_name, last_name etc.
2.in unique rows first column "Org". use if function to check first_2 is avaliable or not.
and if not there then leave it blank and move next row
=IF(IF(LEN(F5)>0,B5,B6)=B6,"",B5)
3.for getting data of first_2, last_2 use vlookup with match formula are as follow
=IFERROR(VLOOKUP($B9,$B$4:$H$8,MATCH(C$3,$B$4:$H$4,0),0),"") and after drag and drop all formula

Excel Formula or function that returns the Nth value from a dynamically generated grouping of cells

I am trying to assemble a index/match combination and am having trouble figuring out how to make it work. I have experience with a lot of the formula types in excel, but unfortunately I am pretty ignorant when it comes to these functions.
I will explain what I am trying to do first, but I have attached 3 images at the end that will probably make things more clear.
In order to identify the specific values I want, I am having to use helper cells. These helper cells are denoted with the (helper) tag in the pictures. These cells go through and grab the adjusted closing price of the stock (column A) at the beginning (column C) and the end (Column D) of a dynamically calculated period.
I would like to consolidate these values into numerical order in columns F and G. The thought is that the first non zero number in C/D is belongs to the first predefined period and should go into columns F/G beside the #1 (column E). This gets carried on through all of the periods (ex: 2nd non zero goes beside the number 2, third nonzero number goes beside the number 3 etc.)
This is just an example of one stock. I need the function or formula to be dynamic enough to work on a wide variety of distributions. Sometimes there are up to 100 dynamically calculated periods within the stock analysis.
Below are the images that should provide more clarity
Image 1 is an example of what the data looks like
Image 2 is a crudely drawn example of how I would like the data to move
Image 3 is the desired result
Image 1
Image 2
Image 3
Updated image for Scott Craner showing out of order results
Please let me know if I can clarify any confusion.
If you just need to return the first value of each period (column C) and the last value of each period (column D), you could use index match and lookup to do this without even using helper columns.
Try this in cell F2
=INDEX(A2:A50,MATCH(E2,B2:B50,0))
And this in cell G2
=LOOKUP(E2,B2:B50,A2:A50)
Depending on much variance is in your overall number of rows, you could use indirect references in the formulas to dynamically update the ranges.
Example:
=INDEX(A2:INDIRECT("A"&COUNTA(A:A)),MATCH(E2,B2:INDIRECT("B"&COUNTA(A:A)),0))
You will need to open macro. Then do the following in recorded macro.
+ Filter only non-null value in C/D
+ Select whole column in C/D then copy the whole column
+ Turn off Filter
+ Paste the whole C/D in F/G
+ Stop macro
Gook Luck
Put this formula if F2:
=INDEX(INDEX(C:C,MATCH($E2,$B:$B,0)):INDEX(C:C,MATCH($E2,$B:$B,0)+COUNTIF($B:$B,$E2)-1),MATCH(1E+99,INDEX(C:C,MATCH($E2,$B:$B,0)):INDEX(C:C,MATCH($E2,$B:$B,0)+COUNTIF($B:$B,$E2)-1)))
Copy over one column and down the list.

Conditionally sum specific columns in multiple column table

I have a timetable that shows every day of the year. The columns are headed with month names and h (for hour). If I mark a day with a label I put a number on the h column right next to it. These numbers should be summed up whenever the appropriate label is found.
Example of my timetable
So the formula (not query!) should look for a specific label on the whole timetable and sum all numbers right next to it in one cell.
I've tried several solutions but I guess I just don't understand the mechanism of array formulae to achieve a solution and even the SUMIFS function doesn't get me anywhere.
=SUMIF(B4:Y34,"WM",C4:Z34)
works for me. Don't know why sumifs didn't for you but then you haven't said what your problem was with it.

How do I populate a cell based on its value from a range?

Hello,
Please forgive me if I didn't word my question very well. However, I have an excel spreadsheet that I must complete and submit to our headquarters on a monthly basis. I've been manually editing most of the fields but I think there's a way to automate some of the values. Unfortunately, I haven't figured it out yet so I thought I'd seek help here.
So I have two tables (Table1 and Table2) - images below. What I need is a way to automatically populate the RATE FACTOR (Column D) if the WEIGHT (Column C) falls within a certain range (defined in table2).
I was reading on here about using VLOOKUP, but couldn't get it to work. Any assistance would be appreciated, thanks.
IMAGES BELOW (had trouble attaching images to question).
Table 1: https://dl.dropbox.com/u/55292384/table1.jpg
Table 2: https://dl.dropbox.com/u/55292384/table2.jpg
//Kismet
Assuming that your example has the titles in row 1, in cell D2 enter =VLOOKUP(C2,$G$2:$H$17,2)
You can copy this formula to the other cells in column D.
VLOOKUP demands that the table of values is sorted in ascending order by the first column. The lookup value (here C2) is found in the first column and the 2 says to return the corresponding value in the second column. By default if the lookup value is not found, VLOOKUP returns the result corresponding to the nearest value less than the lookup value. This may or may not suit your rate factor calculation (if not, I can make an additional suggestion).

How can I mark duplicate values in a column based on a second value in a different column in Excel 2007?

I have been trying to mark duplicates in the same excel column based on a criteria in a different column, and I would love to have some help. In reference to the example below, I would like to highlight all the rows that is a duplicate value of another row red, and put a Y in a third column ("Delete" in the example below). When the value in the Name column is a duplicate of another, disregarding case sensitivity, I would like to mark all but one value based on a hierarchy in the Status column, i.e Excellent, Good, and Bad.
Only one of each unique value can be left unmarked, and if two share the same status with no duplicate value of a higher status then either one can be marked (the one further down the list if thats easier to specify).
I have been looking around the site and have found lots of similar entries on deleting duplicates but nothing quite the same. I need to highlight and not delete the duplicate rows and I have not been able to find anything that will let me sort based on a heirarchy in a second column. I only need to execute the command once as oppose to on a recurrence so the time it takes is not a concern to me. Any help you guys can throw my way would be greatly appreciated.
See if the sheet and steps below solves your issue.
Status_order Formula: Range("E2") =VLOOKUP(D2,$I$2:$J$4,2,FALSE)
Sort A1:E15 by Name, Then by Status_Order Smallest to Largest
Delete Formula =IF(A2=A3,"Delete","")
Fill All Formulas Down
Add Conditional Formatting on all columns to be Red if Column C = "Delete"

Resources