iText setMinimumHeight on splitted cell - height

I call setMinimumHeight on a cell with some text that is split over two pages. In the second page there are only 2 lines of text but the height of the cell is set to "minimum height".
I'm not sure if this is the desired behavior... and if then, is there a way to avoid it?

Related

In Google Sheets IF formula over several cells

I'm not sure if I'm approaching this problem wrong, but there's got to be an easy way to do this.
I simply want to see if Certain text is listed above that cell. If it's not, Put that text. If it is put blank.
This is what I have:
=if(F4:F5="TEST","","TEST")
This gives it an array formula error so I created this:
=arrayformula(if(F4:F5="TEST","","TEST"))
But I don't need two results... just a yes/no statement. If the cells in this range contain "TEST" leave blank, if it does not contain "TEST" display the word "TEST".
What am I doing wrong?
If the cells in this range contain "TEST" leave blank, if it does not contain "TEST" display the word "TEST".
Use COUNTIF()
=if(countif(range,"TEST"),,"TEST")

How to use Data Validation, Number must start with 7

I want to find a formula that can validate the order number. if the future order numer entered does not start with 7****, it will show a warning. Thank you so much for your help.
https://docs.google.com/spreadsheets/d/1piS3GQ5TzrGAr4VSoSbABkMa-fRm6n_wP16RimegO6E/edit?usp=sharing
Select the range of cells that you only allow texts that start or end with certain characters.
Click Data > Data Validation > Data Validation.
In the Data Validation dialog box, please configure as follows.
1 Select Custom from the Allow drop-down list;
2 For allowing texts that start with certain characters, please copy the below formula into the Formula box;
=EXACT(LEFT(A2,3),"KTE")
And for allowing texts that end with certain characters, please copy the below formula into the Formula box;
=EXACT(RIGHT(A2,3),"KTE")
3 Click the OK button.
Notes:
In the formulas, A2 is the first cell of the selected range; 3 is the number of characters you specified, KTE is the start or end text.
These two formulas are case-sensitive.
If you don’t need case-sensitive, please apply the below CONTIF formulas:
Only allow texts that start with KTE in a range of cells
=COUNTIF(A2,"KTE*")
Only allow texts that end with KTE in a range of cells
=COUNTIF(A2,"*KTE")
And then, click OK button. From now on, only the text string begins or ends with the centain characters you specified can be entered into the selected cells.
In your case, replace KTE with 7 since you want yours to start with number 7.
Yours should be:
=EXACT(RIGHT(A2,1),"7")
You can remove the quotation marks housing the number 7 since 7 is an int, not a string (varchar)
=EXACT(RIGHT(A2,1),7) maybe you can try this if the former fails.
use:
=REGEXMATCH(""&A2, "^7.+")

Change the distance between the bullet and the text | Api JavaScript for Word

I need a space after the number in the list. Tell me please, how to do this using Api JavaScript for Word.
In the properties of the List object, I can only set the spacing of the paragraph and the indentation of the first line of the paragraph (setLevelIndents).
The distance between the symbol and the text is the difference between the first and the second properties in the dialog box in the image. The first of these sets the indent of the symbol from the text margin; the second the indent of the text from the text margin. Increase the latter or decrease the former in order to increase the space between symbol and text.
In the Office JS API (API Set Word 1.3) the corresponding method is set​Level​Indents. The method signature
set​Level​Indents(level, text​Indent, bullet​Number​Picture​Indent)
The second parameter (textIndent) corresponds to the second control in the dialog box shown in the question. The third parameter (bullet​Number​Picture​Indent) corresponds to the first control in that dialog box.

Sheets is treating "0" like a blank cell

I need help with what I'm sure is a simple formula that I just don't understand.
I have three columns. The first two hold my values and the third is meant to subtract them. However, when the first column is blank, I would like the third to also be blank. I have it close right now but when I type 0 in the first column, it treats that as a blank cell instead of using the 0 to give the sum.
Ex. of what I would like
expected result:
I can't seem to figure out the formula for the third column.
Yes this is a quirk that goes right back to the dawn of spreadsheet applications; in an empty worksheet the formula =A1 written anywhere other than the top left cell will evaluate to 0.
One way, in Google Sheets, is to use something like
=IF(ISBLANK(A1), ,A1 - B1)
In Microsoft Excel you need to use double quotations characters in the second argument, noting that this injects a blank string into the output.
This if statement (put in the 3rd Column) checks the first column if blank then just set cell as blank else perform the subtraction:-
=IF(A1="", "", A1-B1)

Conditional Vlook up without using VBA

I want to convert an input to desired output. Kindly help.
In the output - the columns value should start from most recent (year)
Please click this to see data
Unfortunately VLOOKUP is not able to fulfill that ask. However the INDEX-function can.
Here is a good read on how to use it:
http://fiveminutelessons.com/learn-microsoft-excel/use-index-lookup-multiple-values-list
This will work for you spreedsheet, if your input table starts at A1 without a header and your output table starts at H3 with the first ID.
You get this by copy&pasting the first column of your input table to column H and then remove duplicates.
{=IF(ISERROR(INDEX($A$1:$C$7,SMALL(IF($A$1:$A$7=$H$3,ROW($A$1:$A$7)),ROW(1:1)),3)),"",
INDEX($A$1:$C$7;SMALL(IF($A$1:$A$7=$H$3,ROW($A$1:$A$7)),ROW(1:1)),3))}
Let's look at the formula step by step:
The curly brackets tell excel that this is an array formula, the interesting part for you is: when you've inserted the formula (without curly brackets) press shift+ctrl+enter, excel will then know that this is an array formula.
'error at formula?, then blank, else formula
=IF(ISERROR(....),"",...)
When you autofill this formula you probably dont know how many instances of your lookup variable are. So when you put this formula in 4 cells, but there are only 3 entries, this bit will keep the cell blank instead of giving an error.
INDEX($A$1:$C$7,SMALL(IF($A$1:$A$7=$H$3,ROW($A$1:$A$7)),ROW(1:1)),3))
$A$1:$C$7 is your data matrix. Your IDs (in your case 125 and 501) are to be found in $A$1:$A$7. ROW(1:1) is the absolute(!) rowID, 3 the absolute(!) column id. So when you move your input table those values have to be changed.
What exactly SMALL and INDEX do are well described in the link above. (Or at least better than I could.)
Hope that clarified some parts,
Tom