Generate x, y coordinates from input parameters - excel

I am trying to overlay patient data on top of an optical image. I need to assign X,Y coordinates for each patient file in a bunch of designated boxes in the optical image.
I am currently doing this by hand but I wanted to try and do this automatically by giving Excel the starting coordinate (for the upper left corner pixel of each box), the number of rows and columns for the box as well as the spacing between each pixel. I would need the X and Y coordinates in separate cells.
For instance, for a box with 3 rows, 4 columns, pixel spacing of 20 and starting coordinates of (20,50), the output should look like:
X Y
20 50
40 50
60 50
80 50
20 70
40 70
60 70
80 70
20 90
40 90
60 90
80 90

According to your description maybe:
Formulas:
A8:
=IF(ROW(1:1)<=$B$1*$B$2,$B$4+MOD(ROW(1:1)-1,$B$2)*$B$3)
B8:
=IF(A8,$B$5+$B$3*INT((ROW(1:1)-1)/$B$2))
Both formulas copied downwards as needed.
Transposed version:
Formulas:
B7:
=IF(COLUMN(A:A)<=$B$1*$B$2,$B$4+MOD(COLUMN(A:A)-1,$B$2)*$B$3)
B8:
=IF(B7,$B$5+$B$3*INT((COLUMN(A:A)-1)/$B$2))
Both formulas copied sidewards as needed.

Related

Data brushing in MS excel

I'm using MS Excel 2019 and I'm trying to copy only coordinates of specific selected data points in a scatter plot. Does anyone know whether this is possible. Any possible workaround if possible? My input to the Excel scatter plot are basically x and y coordinates in all 4 quadrants.
Data used:
x
y
-2
-10
39
-8
56
10
34
8
-89
-8
43
5
-9
4
45
3
67
-16
-87
-19
Scatter plot:
What I need is basically select specific points in the first quadrant as mentioned in the red circle from the Excel plot itself and export the selected data points value to separate table. The mouse pointer hover on each point shows its value, but I can't capture multiple data points value using mouse.
What about creating a helper column, which only allows coordinates in the first quadrant? You can achieve this, using following formulas:
in C2 : =IF(AND(A2>=0;B2>=0);A2;0)
in D2 : =IF(AND(A2>=0;B2>=0);B2;0)

Altering values as a percentage to work with a graph

I have a gauge graph that goes from 0 to 100.
I have divided out my justification points as how they would show on the 0 - 100 graph. -2STDev, -1STDev, Avg, +1STDev. +2 STDev. How would I go about transferring incoming values to a 0 - 100 scale to match the graph?
On the graph of 0 - 100:
16 represents -2STDev
33 represents -1STDev
50 represents Average
66 represents +1 STDEV
83 represents +2 STDEV
My current values that I want to format to a scale of 100 to fit the graph are:
-2STDev = 63.9
-1STDev = 66.8
AVG = 69.6
+1STDev = 72.5
+2STDev = 75.4
How would I go about creating a formula to adjust these to a 0 - 100 scale? Of course my incoming value, will have to also follow this formula to be graphed upon these.
You can use the following long formula:
=IF(E6<C1,E6/C1*B1,IF(E6<C2,(E6-C1)/(C2-C1)*(B2-B1)+B1,IF(E6<C3,(E6-C2)/(C3-C2)*(B3-B2)+B2,IF(E6<C4,(E6-C3)/(C4-C3)*(B4-B3)+B3,IF(E6<C5,(E6-C4)/(C5-C4)*(B5-B4)+B4,(E6-C5)/(100-C5)*(100-B5)+B5)))))
See the location of the data so you can replace for other if required.
Keep in mind this formula does a linear conversion for values inbetween each one of the values you have.

excel:changing the symbol and color of a marker based on grouping

I have a dataset that looks like
ID Vehicle_grp count mpg
000 Car 5 10
Motorbike 20 100
Other 1 25
001 Car 30 60
Motorbike 28 45
Other 85 35
002 Car 100 10
Motorbike 20 200
Other 1 65
etc.
In excel, how do i change the colors and marker symbols used based on the ID and vehicle group. I would like to change colors based on ID, and use a different symbol for each vehicle group (i.e car is circle, motorbike is triangle, and other is cross)
I don't know VBA, so if theres a way to do this through the menus, that would be appreciated
Just make sure you add each series separately. Here are the steps (assume Excel 2007 or greater):
Insert > Scatter
Click the chart > Design > Select Data
Add first series. Series Name = the cell containing 000. Series X Values = cells for count 5, 20, and 1. Series Y values = cells for mpg 10, 100 25.
Add the second series. Series Name = cell containing 001. Series X Values = cells for count 30, 28, 85. Series Y values = cells for mpg 60, 45, 35.
Add the third series according to above.
Following that process gives me:
A little clean-up and formatting, gives me:

EXCEL Bar Graph - representing only part of the bar graph

Hi I'm trying to create a bar graph on Excel where I can highlight part of the bar graph. For instance, for the following table,
1 100 20 30
2 100 10 20
3 100 5 15
I would like to have the value 100 represented and then on top of that have only between 20 and 30 highlighted (or shaded/colored/etc in differnt color) - showing that the total is 100 and the range is 20 to 30.
For 2, same thing, have 100 represented first, and only have 10 to 20 highlighted, and so on.
Would any of you guys please help me on how to go about it? I tried stacked bar with no fill and such but it does not fulfill my satisfaction. Thank you for your reply in advance!!! :)
Do you want something like this?
If so, convert your data to this format:
1 20 10 70
2 10 10 80
3 5 10 85
Use a stacked column chart and set the first and the third series to the same color.

Converting Excel Column with To SSRS (inch or pt)

I have report in Excel that I user gave me and wants the same exact format in the new SSRS report. So if I have a column in excel of the width 14.14 (103 pixels) what should that be for the width of that column in SSRS ( in, mm, cm, pt, or pc)?
I can't get the correct factor because it seems to differ based on size?
Excel Width Pixels Ratio
0.08 1 0.08
0.83 10 0.083
13.57 100 0.1357 ??
142.14 1000 0.14214
254.71 1788 0.142455257
I understand pixels per inch is dpi dependent, but what I am looking for is a printable equivalent.
Here is what I found out about the relationship between excel and ssrs. It seems excel uses 96 pixels per inch. I also found using units of PT in ssrs translates much more accurately into excel and is actually mentioned somewhere in the MSDN documentaiton.
In excel a column of 10 = 75 pixels, 20 = 145 pixels, etc.
Basically the units are 70 plus an additional 5 pixels.
So to set the column in ssrs I used:
[Width in PT] = ([width in excel] / 10 * 70 + 5) / 96 * 72)
For example:
Width 10 in excel = 75 pixels = 56.25 pts = .78125"
Excel (and many other MS related apps) default to 96 pixels per inch.
So your 103 pixel wide Excel column should be:
103 / 96 = 1.073 inches (Rounded to thousands.)
Of course many printing options will change this, such as "Fit on one page."
I used RhodeHummels answer, however I had to change it because there is a missing parenthesis in the answer, I believe it should read:
[Width in PT] = (([Width in excel]/10 * 70 + 5)/ 96 * 72)
e.g. =((10/10*70+5)/96*72) gets the desired answer in excel

Resources