Show Blank If Another Cell Meets Condition
Oct 19, 2007I have 5 cells on a sheet. When one has an X in it the other 4 go blank. It so I can keep track of who has ownership of a job.
View 6 RepliesI have 5 cells on a sheet. When one has an X in it the other 4 go blank. It so I can keep track of who has ownership of a job.
View 6 RepliesI currently have a report that I have code on that will change the color of a cell based on whats in the cell.( Code posted below) However I also need to look at $J and if the first letter of the value in that column is a "z" then I would like to change that whole row to icolor 13 (purple).
For example J14 might be "Z-Thomas". if it does I would like that row 14 to change to purple.
Also I would prefer that the solution be in VB, so that we do not have to do something in VB with the fix below AND do something in Conditional Formatting.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim icolor As Integer
If Not Intersect(Target, Range("$A:$E")) Is Nothing Then
Select Case Target
Case "y", "Y"
icolor = 4
Case "n", "N"
icolor = 3
Case "?"
icolor = 6
I'm setting up a spreadsheet for work and i have a question. I'm not familiar with the formulas. If i want to set up a formula to where if i type "complete" in the cell it will move the entire row over to the next sheet.
View 2 Replies View RelatedI have 2 sheets, sheet1 and sheet2. On sheet1 I have a cell (w,3) which displays either "OK" or "Needed". It will be like this for every row on the sheet. On sheet2 I have more information. I have been trying to create a macro or VB function that everytime the workbook is opened will scan the entire column W for any that say "needed" and if/when one is found copy the data in the cell in column A of the same row from sheet1 to column A of the first blank row in sheet2.
So say cell w,6 displays "needed", I then want to have cell a,6 copied from sheet1 to sheet2 into the first column A that is blank. I don't really care if when w,6 changes to "OK" it removes the entry on sheet2 or not, in fact if it does that would be great.
Here is the code that seems to be not so complicated and has copied information from one sheet to another, can't get it to work consistantly. I copied it off a similar post on this site and am not sure what the last value = "1" is doing but I doubt its helping my cause. The cell I need to trigger the action is in the 23 column, the cell I need copied is always in the first and the cell I need it to be copied into on the 2nd sheet is always in the first column as well. I'm pretty good with regular logical statements but I feel that a lack of knowledge about all the available commands is really whats hurting me on this....
Two Sheets:
1) Top Sheet
2) IRA
- Cells A4:A10 of sheet "Top Sheet" contain dates. i want B4:B10 to show the IRA value as of the date in column A:
____A__________|_B______________________
4 | 09/22/2005 | $ Total as of date in A4
5 | 10/06/2005 | $Total as of date in A5
6 | 10/20/2005 | $Total as of date in A6
7 | 11/03/2005 | $Total as of date in A7
8 | 11/17/2005 | $Total as of date in A8
9 | 12/01/2005 | $Total as of date in A9
10| 12/15/2005 | $Total as of date in A10
- Cells A6:A12 of sheet 'IRA' also contain dates but not in the same sequence (some date ranges had several transactions), B6:B12 of sheet 'IRA' contains the transaction values during the date range:
____A__________|_B______________________
6 | 09/22/2005 | $100
7 | _ _ _ _ _ _| $200.................................
I would appreciate it a lot if someone could explain to me how I hide the value in the cell which a result is stored in when one of the two cells in the calculation is empty.
For exaple:
C1 should be blank if A1 or B1 is empty in this formula:
=A1+B1
I am currently doing a spreadsheet and require cells in column f (which have monetry values entered) to colour in different colours depending on whether there is a yes or no value in column e.
View 2 Replies View Relatedformula to find the last number in a cell and if that number meets a condition put a letter in the adjacent cell.
In cell A1 I have numbers as such 254671 (these numbers vary in length but not normally more than 8 in length). I want to know if the last numeral on the right is a 1 and if so then enter in the adjacent cell (B1) the letter y if not then leave blank.
I have a spreadsheet with about 225 sheets or so containing data. The date is in column J. I am needing to delete all the Rows that have a date greater than or equal to 06/06/08 and loop through all of the sheets.
I recorded a macro to find the date 6/6/2008, then highlight the row, then select the next 450 rows and delete them and it worked ok, but I don't know how to get it to loop through the sheets to the end.
I'm trying to Multi-Select rows in order to format all rows, in "One Step" if the cell in col. "A" = 1. I managed to write the hereunder code but I'm still frastrating because I don't like the first RNG setting command. How can I avoid declaring RNG as row(1) and still be able to run the code. I assume I need some other Range set for RNG which, unfortunately, I could'nt find and the command I used includes row1 in RNG although cell A1 = 5.
Sub Conditional_Multi_Rows_Select()
Set RNG = Rows(1) ' this is my problem
LR = [A65536].End(xlUp).Row
For R = 1 To LR
If Cells(R, 1) = 1 Then
Cells(R, 1).EntireRow.Select
Set RNG = Union(RNG, Selection)
End If
Next
RNG.Select
Selection.Font.Bold = True
Selection.Font.ColorIndex = 3
End Sub
I had in mind to use:
Set RNG = Rows(65536)
but this will not make it a "neat" vba code, either.
I have a userform that should open a file and then figure out if a integer meets a condition. All this works.
My problem is that i want to run another sub from this userform after the file is open(this will be the active file).
I have a worksheet (Data) that lists when pupils are in for Nursery sessions during the week. If they are in they have a 3 (hours) by their name in the relevant columns.
In the AM worksheet I now need to pull through a "register" so under each daily heading I need to pull through everyone that has a 3 next to their name under Monday AM / Tuesday AM / Wednesday AM etc. from the Data sheet. However, I don't want it to copy any blank cells. I then need to do the same for the PM sheet.
I need to copy the data form Cell "C" to Cell "D" only if Cell "D" is empty
i have been using the following code but it will overwrite cell "D" regardless if data is present or not.
I have a page that shows staffing levels. If the member of staff is in work then I have to enter a value of 1 on each member so I can calculate the number of staff present. If they are on leave or similar then I enter a text value such as AL which discounts then from the total staff.
Is there a way to have the default value of 1 in a range of cells if the cell is blank automatically? Can this be done via VB?
I have a formula =MAX(0,37.5-M9) and I need the cell to show blank if the
answer is 0. What can I change?
How do I get the N/A not to show when the cell is blank with this
Code:
=VLOOKUP($A3,WWS!$A$1:$T$41,5,FALSE)
This is my formula. =IF(SUM(P5:P9)=0,"",SUM(P5:P9)
When P5 & P6 = 0 and P7 through P9 are blank, nothing populates for the answer. How do I make the answer = 0, when some 0,s are present in the equation?
I am new to excel vba. I want to show a pop-up message when user tries to save the workbook keeping cell(1,3) blank.
View 1 Replies View RelatedI have a spreadsheet which imports data from worksheets week 1, 2 etc to a monthly summary.
Is there any way I can show a cell as blank if the return equals 0?
I'm sure the resolution is probably simple but then so am I.
On my spreadsheet i have 4 columns which are in currency format. The 5th column (total) adds the 4 up which currently looks like this - =SUM(BG44:BG45) this shows £0.00 in the 5th column.
What i need is a formula in the 5th column (total) so that when it adds up the 4 previous columns if the sum = £0.00 then the total column should show a blank cell.
there is data going to excel from database. The data is something like jan to dec sales and in a arbitrary fashion. now if there wont be data availble for say month of july then nothing will be there.
Now i need to nicely formulate data from jan feb ..Dec and in same order in another cells. Now for empty cells data after formualting it is coming as #N/A. and by this i am getting a same thing in the application where this excel sheet is being used. So for eliminating it i need to use 'if' such that if it is undefined or NULL then blank should be there in the formulated cell.
I have three formula in a spreadsheet, all of which should return a number (which they do) or show blank. However, two of the formula return 'FALSE'. The formula are as follows:
1 Which returns a number or 'FALSE'
=IF(A15="2",(""),IF('Doorset schedule'!N20="l",(""),IF('Doorset schedule'!AY20="l",(""),
IF('Doorset schedule'!AZ20="l",(""),IF('Doorset schedule'!BA20="l",(""),IF('Doorset schedule'!BB20="l",(""),
IF('Doorset schedule'!BC20="l",(""),IF('Doorset schedule'!CN20="l",(""),IF('Doorset schedule'!S20="l",(3),
IF('Doorset schedule'!T20="l",(6),IF('Doorset schedule'!U20="l",(6),IF('Doorset schedule'!W20="l",(4)))))))))))))
2 Which returns a number or remains blank (ie works OK)
=IF(A15="2",(""),IF('Doorset schedule'!N20="l",(""),IF('Doorset schedule'!AW20="l",(""),IF('Doorset schedule'!AX20="l",(""),
IF('Doorset schedule'!CN20="l",(""),IF(AND('Doorset schedule'!AY20="",
'Doorset schedule'!AZ20="",'Doorset schedule'!BA20="",'Doorset schedule'!BB20="",
'Doorset schedule'!BC20=""),(""),IF(AND('Doorset schedule'!S20="l",'Doorset schedule'!
[Code] ......
3 Which returns a number or 'FALSE'
=IF('Doorset schedule'!$CW20="N",(" "),IF('Doorset schedule'!$CX20="1",("1"),
IF('Doorset schedule'!$CY20="2",("2"),IF('Doorset schedule'!$CZ20="4",("4")))))
I am looking for a piece of code that I can use.
Basically if cell A2 is non blank then I want cell C2 to display My Text. I want to do this for every cell down to about A250.
The following are on a sheet:
A1 = 5700
B1 = 235
C1 = 17:14
D1 = 5922
$E$1 = 09:01
$F$1= 3
$E$1 and $F$1 are (the only) absolutes/constants.
A2 contains the following:
=IF(A1>D1,B1,IF(A1+B1<D1,"d",IF(AND(C1<$E$1,B1<$F$1),"",B1))))
This translates as:
=IF(5700>5922,235,IF(5700+235<5922,"d",IF(AND(7:14<09:01,235<3),"",235))))
The result is a variable/number (235), "d" or a blank cell ("").
This formula is in a column and works fine where there are numbers in corresponding cells. The problem arises with corresponding cells which appear blank (show no values) but contain references to other cells: they result in a "d" when nothing should be displayed.
So while a corresponding blank cell is correct if it shows no values, it gives me this problem - I don't want "d" or anything.
For example if I were to take the data in cells d3($358), d4($321), d5($130), d6($82) and skip a cell to now make the same data into cells d3, d5, d7, d9. Next, the data in cells f3, f4, f5, f6 would be merge into the blank cells of d4, d6, d8, d10.
The final result would look like column B. I have over two years of sales data in two separate columns that I need to merged into one column. Is there easier way without a simple cut and paste one cell at a time as this would take an enormous amount of time to complete? I’m not that good with VBA codes so a formula works good, but if VBA is the way to go then tell how to enter it on my worksheet.
I have a column of dates in column E1:E100.
E1 = 25/06/2012
E2 = 02/07/2012
E3 = 09/07/2012
etc.
In column F1:F100 I will insert "Y" in the one of the blank cells next to one of the date cells in column E1:E100.
In cell B1 I want to reference where the cell in column F is "Y" then use respective date in column E.
e.g.
If i have "Y" in cell F1 then in B1 I want to show E1 (25/06/2012).
If i have "Y" in cell F2 then in B1 I want to show E2 (02/07/2012).
If i have "Y" in cell F3 then in B1 I want to show E3 (09/07/2012).
etc.
Looking forward VBA coding for:
If input is entered into column C (range C2:C100), then row cells for columns D, E ,F, H or I must NOT be blank upon save.
Could be that one or more of these row cells are left blank by mistake.
An error msg pops up upon attempting to save, stops the save and colors each cell yellow that needs info entered into.
Using Excel 2010.
I'm newer in VBA. I will appreciate for help creating vba procedure. I would like to hide/show range of cells by that condition:
View 11 Replies View RelatedBasically I have three columns in a work Sheet F, G, & H. F is empty, G contains text and column H has both text and numbers.
I want to be able to automatically copy the value from Cell H to Cell F if cell G contains the word cost.
I would also like to delete all rows where Column G & H contain two dashes -
I'm just stuck on a final thing......I would like the pivot table to collapse based on the outcome of a formula. For instance I've got a project that has A, B, C, D as component parts, these parts all have a percentage work completed. If let's say A is a 100% complete I would like to automatically collapse A, so it will just show the summary for A. Obviously this can be done by hand, but since there is quite a lot of data I would like to automate the proces.
View 8 Replies View Related