Reflect the content of a cell based on the value of another cell - excel-2007

I have a table that has 5 headers, namely - Task, Percentage, Date of Completion, Status and Remarks.
Example:
Task B should be Done by 04/14/2014, percentage 5.20%
Task C should be Done by 04/15/2014, percentage 7.70%
What I need to do:
E6 should always reflect the percentage of the task that has been most recently tagged as Done. Using the image above, for example, since Task B is already Done, E6 should reflect 5.20%. Once Task C is Done, E6 should reflect 7.70%. Thank you for your help. :)

if the % are getting bigger and bigger then you could use this way:
In a column that you'll later hide, type for each line the formula: =IF(E2="Done";C2;""). Drag it downward for each line. You'll have only the % of the 'DONE' tasks, blank in the rest of them. For me this column is column A.
In cell E6 write: =MAX(A2:A5) to have the highest % among those "filtered for Done" with the formulas in column A.
If you want further info on the line with the highest done % use a VLookup formula.
Hope it helped...

Related

Excel - Call function from other cell

First of all I would like to tell you that I have just basics with VBA or Visual Basic. So probably there will be better solution in VBA, but I was unable to find a way. That's why that my attempt is so crude. Also my english can be somewhat broken sometimes. I'm sorry for that.
Below you can find screenshots from my excel sheet. You can notice functions are in czech language. You can find translation below.
Screenshot with actual results:
Screenshot with actual functions:
Translated functions:
AA =COUNTIFS(A:A;X2;D:D;D129)
AB =IF(AA129=1;CELL("address";INDEX(D:D;MATCH(D129;D:D;0)));"NULL")
AC =IF(AA129=1;REPLACE(AB129;2;1;"M");"NULL")
AD =IF(AA129=1;CONCATENATE("=IF(";"""";M129;"""";"=";AC129;";1;0)");"NULL")
AF =ISNUMBER(AE129)
AG =IF(AF129=TRUE;CONCATENATE(AE129);0)
Description:
Every day someone downloads .csv files from JIRA and uploads it to excel. That csv contains test cases. Column X has the date when this csv was uploaded, Column D has the ID of the test case. Column M has the date of the last change on that test case.
Functions description:
AA: It searches if there is the same test case in previous day. If yes, then result is 1. If no, Result is 0.
AB: Locates the exact cell location of the same test case from previous day.
AC: Serves for translation from ID column (D) to last change column (M).
AD: Composes translated information from AC, so it will create a function, which I would like to use further. That function will compare last change date with the test case from previous day and current day. Result should be 1 or 0 depending on if there was any change.
AF: Checks if AE is number (AE should be the column where I would like to run
that function from AD).
AG: If AF is true, then it copies value from AE. Else it's 0
Problem is:
I can't find a way to trick excel to take the text from AD and use it as function in another cell. Tried to program it in VBA, but failed.
What I need:
Translate result from AD from text to function and then run it in AE.
If there is a more efficient way to program this, I am open to suggestions. But I would like to have an answer for my question as well. I want to know if it's possible because I will make more complicated cases later while I learn to work with VBA.
Thanks for the response.

Changing graph range based on specific cell data

See image for what I have going on
So the red column will at some point, which is different every day, change from 20 to 50. The start cell up top uses that lookup formula to find when this is. So for this example it is 10/11/16 14:37. I want to graph the green and blue columns, starting at that cell time and ending at the end time (which is just a max() of the times to get the end time).
I've looked into offset and name manager but I am really confused on those. Either using VBA or something else to change the graph (on a different sheet) to start at whatever that start time is would be awesome.
You can try the following:
In the column AL set, in each cell, the value to be defined by the following formula
AL1 = IF(AI1<50,0,1)
AL2 and following = IF(AL1=1,1,IF(AI2<50,0,1))
Then define each AM to be AL*AK, and plot AM.

How to do a summation only within specific cells via VBA

In reference to the picture below, I would like to loop through a certain column (Column D in this case) until I hit a specific cell (Yellow cells in this case). In my final spreadsheet I have multiple yellow cells that I would like to target. Once I hit a yellow cell, I would like to start a simple summation of the values one cell to the left of the yellow (Column C). I would like to keep summing the values until I hit a blank cell, which would indicate the end of the set.
Please let me know if you need any more clarification!
Here's some code that should get the job done. However you are going to have to adapt it to however you want to use it.
Dim Summation as Double
For Each Target in Range("D:D")
If Target.Interior.ColorValue = 6 Then
Summation = Summation + Target.Offset(0, -1).Value
End If
Next Target
I hope this helps. However, don't forget about FreeMan's suggestions about good question asking and using the macro recorder!

Loop and Grab box to the right

I'm currently working on a project that requires loops which I'm not to sure how to go about doing.. I have the information in blocks so for each client I have a bunch of information so for instance I will have A1 say Name: and B1: say Bob,
Then A17 will be again Name: B17: George
This keeps going for approximately 1000 rows. I need to find a way to circulate through all of the material and grab all the names and place them in a column following each other.
I guess I'm looking for a loop that finds name gives me the value to the right, and then it keeps doing that all the way down.
Anyone have any ideas?
Very simple...........say your names are stored in column B in cells B1, B17, B33, B49, ...basically 16 rows apart...Then in cell C1 enter:
=INDIRECT("B" & 16*ROW()-15)
and copy down. This is good for evenly spaced records
EDIT#1:
Since the records are not evenly spaced..........in C2 enter the following array formula:
=INDEX($B$1:$B$1000,SMALL(IF($A$1:$A$1000="Name",ROW($A$1:$A$1000)),ROW()-ROW($C$2)+1))
and copy down.
This is an Array Formula . Array formulas must be entered with Ctrl + Shift + Enter rather than just the Enter key.
Something like:
Adopted from simocos post
in C1 enter this formula : (with Ctrl+ shift + Enter)
= IFERROR( INDEX($B$1:$B$1000; AGGREGATE(15;6;(ROW($B$1:$B$1000)-ROW($B$1)+1)/($B$1:$B$1000<>"");ROWS(C$1:C1)));"")
then copy the cell down
(the formula is not from me. I use it in one of my workbooks, and adapted it)

Linking cells in excel with a specific format

I am trying to link cells in excel on two different work sheets.
I am using the formula eg: cell1 = cell2 + cell3. The numbers that I have in cell2 and cell3 are in format of 100% (1) and 50% (2). I just want to add numbers 1 and 2 so that my cell1 will have number 3.
Is it possible to do without changing the cell formats?
Thanks a lot.
If you don't care about the percentages, just copy your column with the percentages and change the format of that column to value and in sheet 2, do addition on that column instead.
Unfortunately when a cell has a format of percentage and a user enters a number, it is converted into what it means given the context of the format. It's not like what is being displayed is wildly different than what is 'hidden' inside the cell. When you reformat a cell, that data is reformatted as well, so 50% becomes .5 even if you had originally entered 50 in the cell before changing it's format. Format is more than just 'display format' so maybe that's where the confusion is.
If you want to add the cells in the percentage row and not bother with reformatting the formula cell you can cheat and treat it as a string to get rid of that %. You could do =Left(A2+A3, Len(A2+A3)) that will give you the 1.5 answer without having to format te cell.
Not sure i understood your question but i'll give some elements:
formula and formats are separated in Excel, thus, you can set a formula in A1, say =A2+A3 but displays the value the way you wish
for instance, if A2 contains 100% and A3 contains 50%, then the result in A1 is worth 1.5
you can set the format of A1 the way you wish (Right-clic > Format cells > Number tab), for instance, decimal, the cell will then display 1.5 but if you choose percentage, the cell will then display 150%
Please elaborate your question if needed.
[EDIT] New answer thanks to your comment:
If i understand well, you want to sum up the values between brackets in your cell (whatever is before, event percentages in your case).
Then, you can try this in cell A3:
=MID(A1,FIND("(",A1)+1,FIND(")",A1)-FIND("(",A1)-1 )+MID(A2,FIND("(",A2)+1,FIND(")",A2)-FIND("(",A2)-1 )