How to get the cell position in JQXGrid - position

I want to get a cell position. I am having field's name and row index.
How to get the cell position (x, y) in the screen to place the JQXWindow ?

`var cell = $('#jqxGrid').jqxGrid('getcellatposition', left, top);`
- The getcellatposition method can get you a cell by knowing the x and y. More Grid examples: jQuery Grid Demos

Related

Find closest dimensions (length, width, height) in excel

So, there are different plastic cases: model and inner dimensions (Length x Width x Height). I need find the closest option based on:
inner dimensions which are put in G3:I3 -> the cell J3 should display the closest model
the model of case which is put in the cell K3 and in the cell L3 should find the closest model from other positions in the array.
I have added 3 positions so far but there are thousand+ of them. Would really appreciate if you could help me with that.
I uploaded my excel file to google drive for further reference.
It depends on how you define closest dimensions. For example I created a formula that sums up the absolute deviations of each dimension from the input values of the colored cells and looks for the minimum. Put this into Cell J3 in your example worksheet.
=INDEX(A2:A4,MATCH(MIN(ABS(B2:B4-G3)+ABS(C2:C4-H3)+ABS(D2:D4-I3)),(ABS(B2:B4-G3)+ABS(C2:C4-H3)+ABS(D2:D4-I3)),0))
Array Formula: press CTRL + Shift + Enter to enter the formula

Conditional formatting with icon sets- copy to entire row

I have 3 columns with percentages.
I would like to put an up or down arrow in the same cell as each percentage depending on the previous percentage.
ex: H10 = 54, L10 = 55, P10 = 50
I'd like L10 to read 55 with an up arrow and P10 to read 50 with a down arrow. Then I want to copy this formula down to the 500th rows for columns L and P.
I was able to create this for 1 row (H10, L10 and P10), but when I tried to copy it down to the other rows, it continued to reference the first row (H10, L10 and P10), . I tried to remove the "$" absolute reference and got an error message saying I cannot use relative references. How can I copy this formatting all the way down.
The fields I am using (row H, row L, row P):
Here's what I did to get around this:
I added another cell and calculated the difference between the rows, then set the formula to evaluate if the difference was negative or positive (greater than or less than 0), if it was positive there is an up arrow and if negative there is a down arrow. I made the new row small enough that only the arrow shows and the number doesn't, and I don't have borders on the two rows (the one with the number and the one with the formula) so it looks like the additional row is actually part of the row that has the true value (not the calculation).
There is one way I can think of to get a relative reference while only using what "looks like" an absolute reference.
= $A1
returns the same thing as:
= OFFSET($A$1,ROW()-ROW($A$1),0)
Notice that the formula above uses only absolute references but effectively returns a relative reference.
Try using this method to see if it will work in your case.

Number of Successive Cells of a Same Value in Spotfire

I am wondering if it is possible to created a calculated column that will count how many cells of the same value are successive (i.e., next to each other) so that I can divide it by the total number of cells in that column. (I'm only looking at 1's and 0's in the column. Any help or advice would be greatly appreciated as I've been scratching my head over this for a while,
The percentages at the bottom of the columns is simply = (the number of 1's touching another 1) / (total # of rows) --> my end goal
Ok this has to be done in a few steps.
Insert a calculated column RowId() and name it rid
Insert a calculated column with this expression, and name it [TouchingA]:
If(([Location A]=1) and (([Location A]=First([Location A]) over
(Next([rid]))) or ([Location A]=First([Location A]) over
(Previous([rid])))),1,0)
Insert a calculated column with this expression, and name it [TouchingB]:
If(([Site B]=1) and (([Site B]=First([Site B]) over (Next([rid]))) or
([Site B]=First([Site B]) over (Previous([rid])))),1,0)
At this point, your data will look like this:
Next, insert a CROSS TABLE and set the Horizontal Axis = (Column Names), the Vertical Axis = (None), and the Cell Values = Sum([TouchingA]) / Max([rid]) as [A Percent],
Sum([TouchingB]) / Max([rid]) as [B Percent]
This will show you the values you want, like below. Of course you can sett his in a calculated value in a text area or anywhere else you want with the proper IF or CASE statement. Lastly, you can change the formatting to make the value a % versus decimal.

Formatting Excel-Formula

I have made an excel formula that will take the data entered into column O and then multiply it by .04 and then input that data into column P. So I can calculate a four percent fee from the original number. I am now left with a bunch of $0.00 in every row in the P column that lacks data in the O column. I understand this is because 0*.04 = 0. But what I was wondering is if there was a way to make it so that if the total in column P was less than $0.01 or equivalent to $0.00 that the cell would remain blank.
I tried to post an image to show exactly what I am talking about, but I do not yet have the reputation. Hopefully you can understand what I am trying to do based off what I typed.
Do conditional formatting of the cell such that if the value = 0, the number type is "general"
Then, in your formula for the cell itself (assuming you multiply C3*B3), you can do this:
=IF(C3*B3>0,C3*B3,"")
This will use number formatting for all values that are non-zero, but empty string "" with general formatting for zero values.
Method 1:
Select the cells with the percentages in column P and tap Ctrl+1. When the Format Cells dialog opens, go to the Number tab and choose Custom from the list down the left. Supply the following in the Type: textbox.
$#,##0.00;;;
Click OK in the lower right.
Method 2:
Go into Excel Options (Alt+F,T) and choose Advanced from the list down the left. Scroll the right pane down to the Display options for this worksheet section and uncheck Show a zero in cells that have a zero value. Click OK in the lower right.
You can use conditional formatting when the value is less than 0.01 make the font white
The cell will still be 0 but not visible
Try this: =IF(O2<0.01,"",O2*0.04). This particular formula is checking to see if cell O2 is less than 0.01, and if so is filling in the P2 cell with a zero-length string. If O2 is equal or larger than 0.01 it will multiply by .04 and put that result in cell P2.

Change the Point Color in chart excel VBA

I have this chart in which if any point in graphs exceeds specific limit then its color should change.
can anyone suggest me how to get the chart in VBA and then apply this kind of condition e.g i want to change the color of highest point in the above graph . Any help would be highly appreciated.
Using: ActiveWorkbook.Sheets("Sheet1").ChartObjects("Chart1").Chart.SeriesCollection(1)
Color of each point is .Points(PointNumber).Interior.Color
The number of points you have to cycle though is .Points.Count
The value of each point is .Points(PointNumber).Value
colors of the markers themselves (Applies only to line, scatter, and radar charts):
.Points(PointNumber).MarkerBackgroundColor = RGB(0,255,0) ' green
.Points(PointNumber).MarkerForegroundColor = RGB(255,0,0) ' red
.Points(PointNumber).MarkerStyle = xlMarkerStyleCircle ' change the shape
Let's take another approach, which does not require any code.
Assume your data is in columns A (sequence number or time) and B value, starting in A2 and B2, since your labels are in A1 and B1. We'll add a series to the chart that includes any deviant values from column B. This series will draw a marker in front of any deviant points so the original point will still be present, and instead of reformatting this point the new series displays a point.
In cell C1, enter "Deviant".
In Cell C2, enter a formula that detects a deviant point, something like:
=IF(AND(B2>upperlimit,B2
This puts the value into column C if column B exceeds upper and lower limits, otherwise it puts #N/A into column C, #N/A will not result in a plotted point.
Copy the data in column C, select the chart, and Paste Special as a new series. Format this series to have no line and whatever glaring marker you want to use to indicate an out of control point.

Resources