I'm facing problem a with Crystal report. I want to display location like
J1 // One by one
J3
in data table. Then I want check condition like if J3 and OT='YES' (OT column from datatbase), if true means I want show J3 as bold.
How can I achieve this?
Right click on the field that displays the J1, J3 and click on Format Object to enter the Format Editor.
In the font tab you can find the Style property as shown below:
Click on the [x+2] button which is on the right side of the style property and write the following code there
if {DataTable1.ColumnName} = "J3" and {DataTable1.OT} = "YES" then
crBold
else
crRegular
Replace the DataTable1 with the name of your data source and the ColumnName with the name of the field that holds the J1, J3.
Related
I have a dropdown menu in cell A1 with different mode options (ex mode A, mode B, mode C) and next to this theres another drop down in cell A2 where the user can enter the level they want (ex. level 1, level 2, level 3). Then, theres a cell (B2) where they enter a number between 1 and 3. I would like a pop-up message to appear when the user clicks on B2 and the options are set to mode C and level 2 or 3. So far I have been using this in the data validation box but the input message appears all the time, even if the specified modes/levels arent there. The data validation is in cell B2
=AND(ISNUMBER(FIND("mode C", A1)), OR(ISNUMBER(FIND("Level 2", A3)),ISNUMBER(FIND("Level 3", A2)))
Joey,
I got some workaround to solve your issue. see below -
i defined the formula in one cell(for custom validation purpose) that will give me output as TRUE & FALSE
=IF(AND(A1="Mode C",OR(A3="Level 2",A3="Level 3")),TRUE,FALSE)
Let assume i have this formula in Cell B1.
Now My Custom Validation formula will become like below for Cell B2 -
=$B$1=FALSE
Thats All.
I have an excel file with 3000 rows. The value in A1 is 7/2-79 and in A2 7/2-80 and so on. When I tried to split these values using convert text to columns wizard, I get 7 in B1 and Feb-79 in C1 where I want 7 and 2-79 respectively.
I formatted the destination cells as text, but it not worked. Then I formatted the whole sheet as text, but no change in result.
Please help me.
Edit: While using Convert text to columns wizard, I tried changing column data format from "general" to "text" too.
I just tried it and you have to actually select the column with the 2-79 (step 3 of the wizard) and then fill the radio button that says text. If you only do it to the first column then you wont affect the one that's converting to a date.
Feb-79 is correct. Feb-79 = 2/79.
if you would like a string of text you can make
C1=Feb-79
D1=MONTH(C1)&"/"&RIGHT(YEAR(C1),2)
D1=2/29
or if you want to preserve the date value; right click on the range (cells or column) and Format Cells> Number tab > Custom category > Type: "m/yy" without ""
or you can do this
C1=Feb-79
D1=TEXT(C1,"m/yy")
D1=2/29
To get the same effect
Hope this helps.
I'm using In-Cell-Dropdown in Excel cell, I want Default value "Select" should be shown in the dropdown cell always,If there is no value is selected. please let us know, how to achieve that.
In validation source I have tried that using offset formula, but expected result didn't come. this is the formula I tried.
=IF($F$4=44,OFFSET($Y$4,0,0,Counta($Y$4:$Y$6) -1,1),OFFSET($S$4,0,0,Counta($S$4:$S$8)-1,1))
Try this,
Step 1 : Insert a rectangular shape and refer the shape text from some other cell
Step 2 : Write a formula in the cell that you've referred in the shape
Step 3 : Lock the shape so it doesn't get deleted and then when you select value default selection will disappear and when you delete selection it will appear again.
P.S : If you don't need to retain value after the initial selection you can write a formula like this.
P.s :
I'm unable to create a rule in Conditional Formatting for this requirement. I was tried using this option "Use a formula to determine which cells to format" inside the rule but didnt get proper formulae.
My Requirement:
If I change the Activity value to Completed in column A then accordingly the font color should be in (Sky blue) and font size is (10) in columns B and C.
If I change the activity value to Delayed in column A then the font color should be in (Red) and font size is (Default or no change) in columns B and C.
Also if I manually type to change the Activity type from To Do to Completed then the Final Date column field value should be automatically filled with the current or Today's date which is as on date.
What formulae I can use for this requirement? How?
Changing the text format is easy to solve with Conditional Formatting, changing the cell's text to today's date requires VBA.
1. Text format
Select cells B2:C10
Create a conditional format with "Use a formula to determine which cells to format". Enter this formula:
=$A2="Completed"
Click the 'Format' button and apply the blue text color and your desired font size.
Repeat the steps using this formula:
=$A2="Delayed"
Apply the red font color.
2. Enter today's date via VBA
Open the VBA editor with Alt+F11
Double click the worksheet on the left hand panel where your Activity table is placed (i.e. Sheet1).
Enter this code in the right hand code panel:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 And Target.Value2 = "Completed" Then
Cells(Target.Row, 3).Value = Date
End If
End Sub
I am trying to use the substitute function in Excel to change the 05 in the first column to 04 as follows:
06-05NG22D021 --------------- 04NG22D021
06-05NG22D021-KP01 ---------- 06-04NG22D021-KP01
06-05NG22D021-M01 ----------- 06-04NG22D021-M01
06-05NG22D021-MK01 ----------- 06-04NG22D021-MK01
The problem is that when I use:
=SUBSTITUTE(A1, "-05", "-04")
it does not change the text to what it is supposed to be, it only changes when I remove '-0' like this
=SUBSTITUTE(A1, "5", "4")
it works correctly. The thing is that I have to include the '-0' in the string to ensure that the right part of the text is changed.
Sometimes it's because the cell or the column is locked.
Or also it can be the Format cells number category.
To unlock:
Right click on the cell or the column and in the "Format cells" window go to tab "Protection", uncheck "Locked" if checked.
To change format cells number category:
Right click on the cell or the column and in the "Format cells" window go to tab "Number", change category to "General" especially if "Text" is already selected.
Return to your cell and re-apply the formula.
You may be able to bypass the issue with:
=REPLACE(A1,5,1,4)
(copied down to suit) where the second parameter is the 5th character in A1 (which just happens to be 5).
REPLACE.
(Does not work for first row in your example however.)