How To Change One Condition Based On Another
Feb 2, 2007
I have a "if" statement that goes something like this:
=if(and(Function1),do this, if(and(Function2), do that, 0)
where Function 1 and Function 2 consist of three conditions each.
Now Function 2 has reference to a particular cell (U23), whose value is dependent on other cell references.
If U23 has some real value, I want the above statement to be executed.
However, if U23 displays a "#N/A", I want only Function1 to be executed. i.e. = if(and(Function1),do this,0)
View 9 Replies
ADVERTISEMENT
Apr 12, 2014
So I have one sheet that needs to pull data through to another sheet (which is a stats summary)
I have a drop down list containing 4 options all of which have to be counted separately on the stats summary sheet. However I only need them counted when a value is input in another cell in that row.
For example: I select option 1 from down down menu, but I only want this to be counted on the stats page when I enter a date in the "date" cell.
View 9 Replies
View Related
Jul 31, 2014
I am using the following code to amend the colour of a cell when a name is entered in ROW J however, i need it to colour the row from A to O on the line the name is entered on.
So for example Dave is in j2 (j1 is a header) the line from A2 to o2 goes green.
I have tried a few things with interesting results but not get desired result.
[Code] ......
View 4 Replies
View Related
Dec 6, 2012
I'm working on a macro to change the color of the row between column W to AN if in column K the value is "FCA" (without quotes).
So far I have this, but it doesn't work:
Code:
Sub Test()
For Each cell In Range("K1", Cells(Rows.Count, "K").End(xlUp))
If InStr(1, cell, "FCA") Then
Range("W" & cell.Row & ":AN" & cell.Row).Interior.ColorIndex = 3
End If
Next cell
End Sub
View 1 Replies
View Related
Jan 17, 2008
The codes below allows me to change the color of the cells in Col F & G dependence on the value of Col G. I like to add another condition and that is if Col K the value is cancelled or closed the whole row will be CellColor = 48: FontColor = 2
Sub Risk_Color()
Dim c As Range, myFontCol As Integer, myCol As Integer
For Each c In ActiveSheet.Range("f7:g20000")
myFontCol = xlAutomatic
myCol = xlNone
Select Case c.Value
Case Is = 1, 2, 3
myCol = 34....................................
View 9 Replies
View Related
Oct 3, 2006
I need to change automatically the color of a cell (let say A1) to green if the cell content is YES and to red if content is NO. Which function to use?
View 2 Replies
View Related
Mar 3, 2014
I have have sumproduct formula that works well, however I need a section of it to use a condition.
"=SUMPRODUCT(--(('Input Sheet'!$A$10:$A$20009=3)+('Input Sheet'!$B$10:$B$20009=1)+('Input Sheet'!$C$10:$C$20009=1)=3),--('Input Sheet'!$L$10:$L$20009>=G21),--('Input Sheet'!$L$10:$L$20009<=J21))"
The first section ('Input Sheet'!$A$10:$A$20009=3) looks at column of data and checks if any of the data says 3, however I need the formula to look at the column of data and determine if the figure is =>3 and also =<5.
View 5 Replies
View Related
Apr 11, 2008
I have a whole spreadsheet of data which looks confusing so I need to make it look more attractive to the viewer.
I have column A which shows a number of the branch conducting the transaction and the column will contain numerous different branches which I have sorted into branch order.I think there are too many branches to use the conditional formatting condition (probably 5000 different numbers)
What I wish to do is change the colour of the cell when the branch name changes.
For example
Column A= Branch number
123
123
123
345
345
345
456
456
456
789
789
What I need is to highlight all branches 123 with a colour (any colour say red) but when the change in branch number occurs to 345 use a different colour to highlight all the branches (cells) with the number 345 (say grey).Then when the branch changes to 456 use the same colour that highlighted branch 123 (ie red) .Then again when the branch changes to 789 change the colour back to grey again so the spreadsheet shows rows highlighted when a different branch occurs
The above example would look like
Column A
all branches with 123 ( cell highlighted any colour but say red)
branches 345 cells highlighted grey
branches 456 cells highlighted red
branches 789 grey
View 9 Replies
View Related
Sep 17, 2012
I have a conditional cell that change color or not if condition...OK so far. Now, how can I change the color of a range of cells when condition is in just one cell. Ex:
If C15>=150, change (C3;C20) to yellow.
I really can't find the way to do it.
View 2 Replies
View Related
Jul 23, 2013
I've been looking for a way to get the needed result without using macro but i think it can't happen. I'm using excel for forecasting
I need a formula or script to Vlookup a value for me from another sheet if depending on the date.
If the Today date is > then the Date mentioned in Cell A1+15 days i want A2 till A167 to run a formula that would lookup a certain value in another sheet and replace the current value in A2 till A167
For example
A1= August
A2 = 20
A3 = 40 ......
I want when im in 15 August a formula that will replace the foretasted quantity 20 with the real quantity found in sheet 2. If I am not 1 August i don't want the formula to run.
View 1 Replies
View Related
Apr 26, 2008
I would like to know if there is a way to change the font type in a cell, if a condition is true in another cell. e.g font in cell C3 is Arial Rounded MT Bold and if condition is true in cell F3 then font is changed to Arial Narrow.
View 8 Replies
View Related
Feb 19, 2014
I have a situation that I cannot get my hands on. I have a set of Project Numbers in my Column A. (Will Try to post an example).
I need that everytime I change a number in my Column B that it will change all the numbers, in my column B, based on the matching Text in my Column A.
Demo1.xlsm
View 14 Replies
View Related
Jul 21, 2009
Im trying to use an event change to change the sheet name based on a cell value, but my issue is how can I error trap if the sheet name is a duplicate? Here is what I have so far
Sub ChangeName()
On Error GoTo errhandler
Sheets(1).Name = Sheets(1).range("d10")
Exit Sub
errhandler:
MsgBox "sheet name is already exists"
End Sub
View 9 Replies
View Related
Dec 15, 2009
I want to total column C, but only where column B contains certain data, like add column C where column b contains abd so that i get the answer 7, Hope ive explained it right.
B C
abd 1
abd 2
bmr 3
abd 4
crc 2
crc 3
bmr 2
View 2 Replies
View Related
Mar 22, 2009
I have a column called Average and it have numbers from 0 to 100. I want to set a string on another column based on the value of Average. The condition is
< 50 is negative
= 50 is neutral
> 50 is positive
For example
Column A Column B
45 Negative
50 Neutral
80 Positive
View 4 Replies
View Related
May 4, 2009
I want to insert a line wherever I encounter a number. I have a range of cells in column "A" with invoices listed and at the end of each customer I have the total. At the total line (the number) I want to insert a line. Right now I can't figure out how get the cell value to recognize a number from a non-number data type (bolded area)
View 5 Replies
View Related
Aug 12, 2009
I would like to write a code, that can check the name of cell A1 with A2.
If A1=A2, then insert a blank row between these two rows.
I have started with a loop, but somehow it does not work.
Sub AddRows ()
Dim Row As Long
For Row = 1 To 3800
If Cells(Row, 1).Value = Cells(Row + 1, 1) Then
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
End If
Next Row
End Sub
View 9 Replies
View Related
Dec 14, 2009
I want to delete a row in excel based on a condition.
The condition is as follows:
I have few rows in the excel where the columns 7,12,13,23 are same and column 24 in one row has some number and in some other row the column 24 is blank with orange color filled(the colorindex for orange is 44).
In this case I want the row with orange color filled in column 24 to be deleted.
View 11 Replies
View Related
Jan 28, 2009
i looking for function, which will give me a results if its the person good , bad and other (Y). It will look based on column A, but if will be more equal names in this column, it looks in the column surname (B) and return value from column (Y) in this row. But it can be more equal column B.
Here is an example:
Results what i want are in Z1,Z2,Z3
X Y Z
1 sue doe good
2 joe bond very good
3 mark no bad
SOURCE table
A B C
1 john doe good
2 joe black bad
3 sue doe good
4 mark black not bad
5 joe bond very good
6 mark no bad
7 kat doe bad
View 4 Replies
View Related
Dec 9, 2009
I have a problem with bringing up the data I need to cells in one row.
In row 1 I have dates:
23-Nov 24-Nov 25-Nov 26-Nov etc.
In row 2 Quantities:
2000 1500 250 750 etc.
In row 3 I have dates again (I need to start working towards these qty's): 20-Nov 22-Nov 25-Nov 25/Nov. I would like in column A of 4 row to sum all the qty's (row 2) if the date in row 3 is the same or smaller than in row 1 column A. But in column B and forward I want cells to sum qty's if the date in row 3 is the same as the one in row 1. I have tried : =sumproduct((A3:D3<=A1),(A2:D2)) for cell A4
and: =sumproduct((A3:D3=B1),(A2:D2)) for cell B4 and consequently for others. It comes back as zero value even if I see matching dates/qty's. Does anyone know what shall I change in my formula to make it right?
View 3 Replies
View Related
Sep 27, 2009
I autofilter a list which contains, among other fields, program numbers in column A, account numbers in column B and dollar amounts in column E. I want to display the filtered/subtotal of column E if I select a certain program. Each program has account numbers ranging from 1000 to 8999.
I used =SUM(IF()) formulas to separately display totals with account numbers below 8000, and >7999 with no problem. But when I got to create formulas to display the subtotal, I encountered difficulty.
I used the following CSE formulas to subtotal sum of column E based on the values in column B, the first formula return 0 (zero), which is incorrect. The second formula appears to ignore the IF statement, and returns the total sum instead of the filtered total.
1. {=IF($B$4:$B$112>7999,SUBTOTAL(9,E$4:E$112),0)}
2.{=IF($B$4:$B$112
View 8 Replies
View Related
Dec 28, 2006
function that can find the maximum value in a range, where the range is defined by the rows containing a specific string, i.e:
In column A:
Alm Rød
Alm Grøn
Alm Blå
Special Rød
Special Grøn
Special Sort
...
In Column B I have values for each of the above string names.
Now I would like to find the maximum value for the range with names starting with "Alm".
View 6 Replies
View Related
Jan 19, 2007
i have an issue i need to delete entire row if a condition is met, i need syntax if possible to delete if a cell word "begins with" a certain letter ...in this case...letter A
column is "O"
must search threw entire row
View 3 Replies
View Related
Jan 18, 2010
I need a formula that will return a total for the number of cases that have been closed within 6 months. Also I need a percentage total for number of cases that have been closed within 6 months. So the conditions are that the case has been closed and within 6 months.
I tried to use a IF formula that returned a 1 if within 6 months and a 0 if outside 6 months and then just SUM() the column, however for some reason that just returns 0. I am using Excel2003
View 4 Replies
View Related
Nov 6, 2013
Is there a way to filter data based on multiple OR condition with a like parameter.
I have data which has near about 50000 rows and now i would like to filter on a header called "Activity Type" and would like to fetch result for a text which resembles "from ABC group" or "From PQR group" or "From XYZ group".
View 5 Replies
View Related
Mar 10, 2014
I'm trying to set it up so that if a particular cell has any data in it, the contents of a different cell get sent to another. I want the no data/data to serve as a trigger.
As an example, if I put anything into cell A3, I want the contents of cell A1 to copy to H1. I'd also like it to be dynamic so that if I put something into cell B3, the contents of B1 get copied to H1, etc.
View 4 Replies
View Related
Apr 4, 2014
I need a macro I can run that will insert a row whenever Column A changes (from PPN A to PPN B to PPN C, etc.) and that will insert string values into the Cells as follows:
In all cases, the insert cell values into column A (PPN) will be the value from the previous cell and column B (CPN) will be 'LABOR'
Here's image of before and desired after:
Before:
PPNCPN
4AQ02SLAG
4AQ02SAND
4AQ02CHIPS
4AQ02PORTLAND
4AQ02ADMIX
4AQ02AUTUMN BLEND
4AQ02OVERHEAD
4AQ03SLAG
4AQ03SAND
4AQ03CHIPS
4AQ03PORTLAND
4AQ03ADMIX
4AQ03BETHEL BLEND
4AQ03OVERHEAD
After:
PPN CPN
4AQ02SLAG
4AQ02SAND
4AQ02CHIPS
4AQ02PORTLAND
4AQ02ADMIX
4AQ02AUTUMN BLEND
4AQ02OVERHEAD
4AQ02LABOR -insert row and populate cells here
4AQ03SLAG
4AQ03SAND
4AQ03CHIPS
4AQ03PORTLAND
4AQ03ADMIX
4AQ03BETHEL BLEND
4AQ03OVERHEAD
4AQ03LABOR -insert row and populate cells here
View 1 Replies
View Related
May 20, 2014
I have a workbook sheet change condition that, when triggered runs the following code (amongst others).
[Code] ......
What I would like is to amend the above (possibly in a loop?) so that it skips the rows in which the value "New" features in range F17:F190.
So basically Autofill as per the code but leave the values in the cells of the range in which New features in range F17:F190
View 4 Replies
View Related
Jun 16, 2014
I have table in which against the Column A data values are added in Column B, C and D.
If Column B,C and D cell values is 0, then I want entire row including A to be deleted. How can I do this in VBA?
Note: Column A data begins from Row 15 and below.
Just to avoid confusion. I want row deletion, only when all the three cell on B,C and D is = 0
View 7 Replies
View Related
Mar 14, 2014
I have a file in which I have data from A9:I50.
In the column C i have the type mentioned either MTC or SELF.
If the value in column C is SELF then I want to highlight the corresponding rows from A:I.
[Code] ......
This code is colouring the entire row.
I want it to be highlighted from A to I.
View 2 Replies
View Related