If E10='Dealer', Then SUM of D10=0;If E10=Customer, Then SUM of D10=B6/2
E10 is a drop down Menu. It has one other option of 'Pick One' that has no relevancy.
I'm not sure what I'm missing, or if I am able to set it up like this.
Put this formula inside D10 because that is the cell you want to change.
=IF(E10="Dealer",0,IF(E10="Customer",B6/2,""))
When the Dropdown is at "Pick One" this formula will default to "" (empty cell) you can change that to anything you want.
Related
Using data validation, I constructed a dropdown list in cell "A1" in Excel that says "Yes" and "No."
What I want is for the user to select "Yes" or "No" in cell "A1." It should not be left blank; instead, it should alert us that "cell A1 should not be blank."
What is the best way to do this in Excel? Could someone please assist me?
In B1, put the formula:
=IF(ISBLANK(A1)," Must enter a choice"," OK")
(The spaces allow room for the Data Validation dropdown arrow.)
Is it possible in exel to set the background color of a cell with a formula?
One that I can write = BackgroundColor(RGB(1,1,1), "my value").
Thanks
Example:
Range("A1").Interior.Color = RGB(255, 0, 0)
According to answers here and my research, it's actually not possible.
You can do this as said with conditional formatting. For example if you want to change the colour of the cell A1 when A1 equals 3, you need to go to 'Home' then 'Conditional Formatting'. There you can choose the option 'new rule'. Note that you need to mark the cell A1 before doing this. Then you click on 'Format only cells that contain'. Then you choose 'equal to' and write in the box behind '3'. Then you can click on 'Format' and make it as you want it. If you then click 'OK' and write '3' in cell A1 the cell becomes how you formated it.
I would like to change the currency symbol in a cell depending on the value in another cell, in the row.
For example if cell A1 contains "EU" then cell A2 will be "€ 5.00" (If the calculation was 3+2), and if the content in cell A1 were to be changed to "GB" then £ 5.00 will display in A2.
Is is possible to do this in VBA? I would prefer NOT to do a simple IF statement.
You most certainly can! Utilize conditional formatting on your range with the currency value. Here is how I accomplished this in a test...
Select the first cell in your "amount" range and then click Conditional Formatting -> New Rule.
Select "Use a formula to determine which cells to format"
In the box, type =if([Cell w/ Country] = "USA", 1, 0 ). Note, [Cell w/ Country] is whatever cell that indicates the type of currency. In my example, the formula is =if($A6="USA", 1, 0). [Pay close attention to the cell reference $A6 - you want the formula to work for the entire column (in this example), so don't enter $A$6.]
After typing the formula, click the "Format" button.
Click on the "Number" tab and choose "Currency" in the Category list
Using the Symbol dropdown, select the symbol corresponding to the rule you just created - in this case, $, then click OK.
Finally, you're left with the Rules Manager window. You'll want to select the range that the rule will apply to. Enter the range, or click the range selector button and highlight the range. Then, click OK.
Here are some screenshots that might be helpful:
Swap around the Country, and the symbol changes.
If it only for one cell then a very short macro will do it.
just change for custom format as within the code:
Sub Macro2()
If Range("a1").Value = "EU" Then Range("A2").Select: Selection.NumberFormat = """€""#,##0"
If Range("a1").Value = "GB" Then Range("A2").Select: Selection.NumberFormat = """£""#,##0"
End Sub
You don't need VBA for this - just good 'ol conditional formatting. With your A2 cell selected, go to Home --> Conditional Formatting. Then click "New Rule" --> "Use a Formula to determine which cells to format".
For the GBP formatting, use the formula =$A$1="GB", then click "Format", go to "Number" along the top, choose "Currency", then just find the GBP symbol. Click "OK" all the way out. There you go!
For the EUR part, repeat the above, but instead use =$A$1="EU" and find EUR symbol in Currency.
I have this formula:
=Y606=SUM(I606:X606)
Can anyone please advise me how to make the cell colour change colour if false?
As follows from the header of your question, you are using Kingsoft Spreadsheets.
So, you need to use Conditional Formatting.
If you have this formula i.e. in cell Z606 than
1. select Z606 cell
2. select "Format" -> "Conditional Formatting"
3. select "Cell value is" and "equal to" in the left
4. enter FALSE in the right textbox
5. choose format style you want to apply
6. press "ok" and that's all:)
Result:
I have a spreadsheet where the first column contains the text "user_#" in each row.
I need to replace the "#" in each row and rep[lace it with the row number such that
user_1
user_2
user_3
'
'
'
user_n
Is there a simple function that I can plug into the first row and then copy and drag so that each row will be filled in correctly?
you could simply have the text "user 1" in the first row and drag down then column. You need to choose the fill type to "fill series" in the "Auto Fill Options" box which appears when you drag down the column
Use this, where B3 is a cell on the same row as the one where you're putting this formula.
=CONCATENATE("USER_",ROW(B3))
Also, you can ="USER_"&ROW(B3) as an alternative. If you need a special format, like integer, you can make sure you get what you want by using this ="USER_"&TEXT(ROW(B3),"#"). Of course, this might be too much if you are using ROW(). I just added it in in case you wanted to reference a non-integer value.