How To Set Cell Background Image In Iphone?

Excelconditional format using vb

  • Hope you could help. I¡¯ve been working on a file that requires VB macros since I use2003 and the conditional formatting only allows me up to 3 conditions. Image below is WA-100822.xlshttp://i38.tinypic.com/2vtbay1.jpg Image below is Printhttp://i36.tinypic.com/16c839j.jpg QUESTION: The conditions are as follows: EXAMPLE: If B25 = RD then background color is RED and font color is WHITE. If B25 = SL, VL, SOLO OR TOIL then background color is RED and font color is YELLOW. then this data is transferred to another cell. EXAMPLE: B5 = B25 C6 ='WA-100822'!B5 Problem is B5 and Print!C6 do not carry the conditional format, it just carries the value. I need B5 to carry the conditional format as well. I also need B25 to change back to the original background if I delete the content. I also need to be able to use Undo (Ctrl + Z). It¡¯s kind of hard to explain. Here¡¯s a link to the file:http://uploading.com/files/m9ec4e9e/Sched+-+2010.xls/ Hope you can help I¡¯ve been working on this for almost 2 weeks now. I¡¯m not an expert VB programmer. I appreciate your help. ANSWER: Polo, >I also need to be able to use Undo (Ctrl + Z). when a macro runs, it generally clears the undo history. macros and Undo are incompatble. ? I also need B25 to change back to the original background if I delete the content. since you made the changes with code, you need to do the restoration with code. You just need to add code in your loop that if the cell is empty, then restore the color. Since it looks like you have unique colors based on locations, you will have to discover where the cell is and then assign the appropriate color based on that location. Formulas don't transfer formatting. A way around this problem would be to produce the "condition" color by using your code to apply a conditional format to the cell with your selected formatting/colors. You don't need a complex formula in the conditional formatting. You just use a formula like =True this will cause your conditional formatting color scheme to be applied/turns on the single conditional formatting condition your code set up (instead of hard coloring the cell and font). Your macro plays the role of determining if the color should change or not - not the formula in the conditional format. The advantage is that when you clear the cell, you code just removes the conditional formatting and the original color is already there (it was screened by the conditional formatting colors). If that isn't clear, post a followup and I will try explaining it again. So the bottom line is that if you want things to happen, you are pretty much going to have to have your code do the work. As far as knowing VB, Your code looks good to me. Does that help at all? ---------- FOLLOW-UP ---------- QUESTION: I appreciate your immediate reply. If I can't use Undo, which is the most valuable key I need, then I would have to do without Macros. Is there any way I can get more conditions using conditional formatting instead of just 3. I use2003. Example: Condition 1: If Cell = RD then background red, font white Condition 2: If Cell = VL, SL, EL, SOLO or TOIL then background red, font yellow. Is there any way I can use conditional formatting to do this?

  • Answer:

    Polo, Yes. Conditional formatting supports 3 conditions in Excel 2003 and earlier. You only show two conditions. when you go into conditional formatting, (Format=>conditional formatting) the resulting dialog has Cell Value is _____________ but there is a dropdown arrow next to Cell Value is and if you click it you can change to Formula is and you can put in much more complex conditions such as (Assume we are formatting B2) in the text box. Make sure you include the equal sign =Or(B2="VL",B2="SL",B2="EL",B2="SOLO",B2="TOIL") then click the format button and choose Pattern Red and Font yellow then add a condition Formula is in the textbox put =B2="RD" click the format button pattern red, font white Now you can select a bunch of cells and conditionally format them all at once if the rules will be the same and the format is conditioned on the value of the cell it is formatting. You just need to write the formula so it is correct for the Activecell in the group of selected cells. so if you had A2:H20 selected and B2 was the activecell, then you would enter the formula as above and it would be applied properly to each of the cells with the formula looking at the value of the cell it is formatting. Is that clear?

Miningco.com Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.