Using For Loop To Assign Numbers To A Series Of Triangles?
Dec 18, 2011
am looking for a code that uses for loops of any other type of loops to create an array shown below:
1 2 6
6 5 1
2 3 7
7 6 2
3 4 8
8 7 3
5 6 10
10 9 5
6 7 11
11 10 6
7 8 12
12 11 7
The array above represents the node number of the triangles within a rectangle as shown in the image. [URL] .....
View 8 Replies
ADVERTISEMENT
Feb 9, 2008
I am trying to assign a named range to a series on a preexisting chart in a sheet, but I get the error that "unable to set values property of series class". This is the code example that DOESN'T work:
Sub assign_values()
Dim myrange As range
Set myrange = range("a1")
Set myrange = union(range("a5"),myrange)
activechart.seriescollection(1).values = myrange
End Sub
However, this code DOES work:
Sub assign_values()
activechart.seriescollection(1).values = range("a1")
End Sub
I don't see why the first wouldn't work, but the second would work. I suspect it is something to do with the union function. i am trying to go through a set of data and then group certain cells into a named range to be used on the graph.
View 3 Replies
View Related
Jun 22, 2006
How do you assign a loop counter value to a range row value? Scenario: Add cells from a column that aren’t successive. SUM C10 + C17 + C24 etc
Private Sub CommandButton1_Click()
Dim total As Integer
Dim counter As Integer
For counter = 10 To 700 Step 7
total = total + Range("Ccounter")
Next counter
End Sub
View 2 Replies
View Related
Aug 31, 2007
This loop is to find if there is the string "Need Parent " in the range. If so the Msgbox notifies the user.
After it finds the string, the loop needs to exit- I tried to assign a counter to the MsgBox, but no go....
For i = 6 To lLrw
If Range("D" & i).Value = "Need Parent" Then
MsgBox "Stop. Parent Records Still Need To Be Created."
End If
ii = MsgBox + 1
If MsgBox > 0 Then Exit For
End If
Next i
View 9 Replies
View Related
Oct 12, 2010
I have a list of numbers in sequential order. There are numbers missing. Is there a way to have Excel insert rows for the numbers that are missing in the series.
example:
1
2
3
4
8
9
becomes
1
2
3
4
8
9
View 7 Replies
View Related
Mar 14, 2008
I want to ask that I have got a workbook with different number series i want user form where i can enter its start number and end number and then it finds and delete shift cells up said series number i have entered in user form please see mentioned below example.
Series
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
and i want to delete 1 to 5 numbers delete to shift cells up.
View 9 Replies
View Related
Nov 29, 2012
How would I loop through all series collections on a chart?
View 3 Replies
View Related
Jun 13, 2014
I need to loop through a worksheet to find the following product ID's: 100805, 6950000, 853000 and 20994000. Each time I find the product ID I have to execute the same code in that part of the worksheet to extract data.
I just do not know how to set up the macro to loop through each ID.
View 9 Replies
View Related
Apr 8, 2008
I am looking to create a number of series on a chart (xyscattersmooth) from a datatable. Below is my data Table....
View 9 Replies
View Related
Aug 12, 2009
I need to assign different cities numbers in a column to the right, but I can't get this formula to do this....
View 9 Replies
View Related
Sep 7, 2007
I would like to know if I can do a VBA code that takes one formule that is showed as text in one cell (eg '=wood+plastic) to the next cell to really use it... I mean, that one time we define de "wood" valeu and plastic valeu will realize the calcul.
View 9 Replies
View Related
Apr 5, 2006
I have a worksheet(Shed) and the range where numbers will be entered are B3:E46. In another sheet(Location) I have a in column A "Shift #", B "Shift Bus #" C "Location". what I am attempting to do is when a bus number is entered into Shed! ie.. b3=900, d15=350 etc.... Location! would lookup ie.900 in the Shed! and match it to Location! (column B) and from there provide the cell ref in column C. So I could then print Location! that would give me in Shift # order where each Bus # the shift is assigned to.
View 13 Replies
View Related
Jul 3, 2014
I'm trying to program a spreadsheet for staff attendance at a school. In the spreadsheet the staff member has personal days, sick time, and sick time in the bank (sick time rolled over from last year). When they use sick time, it needs to come out of the bank first, until it reaches zero, then it should move on to the sick time accumulated for this year.
Staff attendance WIP.xlsx
On the left side is the staff name, sick time, personal days, and bank. Then are the school days for July (if a staff member uses sick time/personal day it is placed under the date it was used). On the far right is the total remaining amount that the staff member has left.
The formula I have for cell AF4 is: =MAX(0,G4-SUM(H4:AC4)) so that the cell will not go below zero.
The formula I have for cell AG4 is: =E4-(COUNTIF(H4:AC4,"P")+(COUNTIF(H4:AC4,"HP")/2)) So that when P for personal day is entered, it will take a whole day, and when HP is entered a half a personal day is subtracted.
I need to figure out a formula for cell AD4. I've tried a couple of formulas I've seen on other posts, but they weren't for a series of numbers like this. And when I put them into this particular spreadsheet, it would subtract the bank until zero, move on to the 'sick time' cell and subtract the SUM of all the days sick rather than subtracting what was left when the 'Bank' reached zero.
View 1 Replies
View Related
Nov 15, 2008
The series 1,3,6,10,15,21,28,36 ("A" series) is the ongoing sum of 1+2+3+4+5+6+7+8 ("integers") and naturally goes on for as long as on chooses. I am only interested in the numbers up to 100.
Is there an Excel function that will allow me choose any integer as a starting point and any higher integer as an ending point and provide the sum of the "A" series associated with the two choices.
For example: If I begin at 6 and end on 12 it would give me 308 =28+36+45+55+66+78
00
11
23
36
410
515
621
728
836
945
1055
1166
1278
1391
View 9 Replies
View Related
Dec 10, 2013
I have a list of data in Column A of a spreadsheet that is all at different lengths.
I would like to return the numbers from this (see below) seperately and also everything after the last number so returning "green"
Example:
EAST MIDS, YORKSHIRE0112012green
EAST MIDS, YORKSHIRE0112012red
EAST MIDS, YORKSHIRE0112013black
EAST MIDS, YORKSHIRE0112013brown
View 1 Replies
View Related
Dec 4, 2012
How can I subtract a series of numbers from an array. example.
Code:
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
13
14
25
26
37
39
[Code] ......
=ABS(1-B2) C2,D2,E2,F2 AND G and after start again with =abs(2-B2:G2)
I want to know how to do this for example until 60, I mean 60 minus the row B:G
View 1 Replies
View Related
Aug 30, 2013
I have a graph with something like 40 series that are being plotted. For one, I create non-standard data labels using VBA. In that code, I refer to ChartObjects(1).Chart.SeriesCollection(34). At some point I deleted a series that preceded it in the "select data" list and the code crashed. Took a lot of digging to learn that SeriesCollection(34) had become SeriesCollection(33).
To avoid this in the future, is there a way to refer to the SeriesCollection by a unique name rather than a sequential number?
View 4 Replies
View Related
Apr 5, 2014
I have a series of raws with 7 numbers in each raw; sums may vary a lot from raw to raw, and also differences between one number and the other in a same raw.
Now, i need to obtain a much simpler distribution of scores, so reducing differences.
I would need to transform all numbers into a 0-4 score distribution, according to differences between numbers in a same raw. It's like a kind of rank score.
I want to obtain in each raw:
- 1-2 numbers with score = 4 (if three or more numbers have similar values: no 4 scores)
- a maximum of 3-4 numbers with score 2-3 (according to differences between these numbers but also also according to the 4 scores already assigned)
- all other scores = 1 if the numbers are >0
- all other scores = 0 if the numbers are 0
example: |14|23|3|0|45|0|10| => |2|3|1|0|4|0|2|
Would it be possible to do with Excel?
View 9 Replies
View Related
Mar 25, 2004
I have a spreadsheet, with about 1,500 lines. In column A is a list of numbers that I need to remove the last digit from each number, for example in A22 is 02602726521 - I need this to be 0260272652. The numbers are all uniqe.
How can I remove the last digit from every number, without going in manually to do so?
View 9 Replies
View Related
Jun 12, 2014
Have Series 1 (to be a line chart) with 20 data points X values are 0 to 68. Have Series 2 (Bar chart) with 68 data points, again X values 0 to 68
Cant get series 1 to display beyond X value of 20
View 3 Replies
View Related
May 27, 2014
I have a series of numbers in cells B2 to G2. The maximum value of each of these columns is found in B5 to G5. Is there a formula that will calculate the percentage of each of the values in row 2 (B2 to G2) and tell me which is the lowest number based on the percentage? Example...
Row 2: 12, 100, 43, 1444, 141, 332
Row 5: 25, 140, 55, 3000, 244, 440
Which number in row 2, is the lowest percentage of the total possible points found in row 5?
B2 is 45% (12 divided by 25), C2 is 71%, D2 is 78%, E2 is 48%, F2 is 58%, G2 is 75%.
I want a formula to tell me in a new cell that "12" (in B2) is the lowest percentage in that series.
View 4 Replies
View Related
Mar 28, 2012
I am doing a Golf scorecard but I have been having trouble figuring out how to calculate the last 6 lowest scores in a series of about 30 scores. What formula to use? Series looks like this
43 52 52 51 44 44 60 54 40 50 53 = 272
View 8 Replies
View Related
Oct 2, 2012
solve this task with a formula or a macro?
I have this strange number data stored by columns. Each cell contains one number series of different length from 1 to 13.
Needed results 1, Needed results 2
7409998765 7409998766 , 9998766567876, 7409998765 9998766 9998766 7409998766 9998766 9998766567876 9998766 9998766
I need to look-up and bring in one cell for each row only the 10 length numbers separated by space and in another cell the 13 length numbers space separated also.
The number of columns containing data is different from row to row ( from 2 to 60)....and the rows..are thousands..
View 7 Replies
View Related
Jul 18, 2013
What is the syntax for the formula for the minimum number, greater than zero, in a series of numbers.
I have a row of numbers, including some zeros, but I want the minimum number excluding the zeros.
View 5 Replies
View Related
Apr 4, 2008
I have a long list of numbers (1 to around 3000) in Column A and I need to print out only the numbers missing from that list. The numbers are sequential (except the ones missing) and there are no blank or missing cells, only missing numbers.
EXAMPLE:
1
2
4
5
7
.....
So I would only need to print the number 3 and 6. - it can be all in one cell, or in one column, it doesnt matter.
View 2 Replies
View Related
Apr 29, 2009
I have a series of numbers in one column. Is there some way I can divide all the numbers together by, say 10, without doing it manually?
eg.
12
15
15
25
20
should become
1.2
1.5
1.5
2.5
2.0
Is there a way in Excel to do that?
View 3 Replies
View Related
Oct 9, 2013
I have got to extract a series of mixed letters & numbers from a cell. The format of the data i need to extract is always [Letter][Letter][Number][Letter][Letter]][Letter][Number][Number]. The problem I've got is the notes field is not in a standard format as it can be anywhere in the cell.
The table below shows the notes cell & the Data I require.
Notes
Required Data
Fault number AB1ABC12 is complete
AB1ABC12
BC2ABC12 status is unknown
BC2ABC12
pending job ws1abc12
ws1abc12
View 6 Replies
View Related
Dec 19, 2006
I have a txt file imported into excel that's slightly strange.
But once into excel, I need to edit some numbers.
The values in cell B 23 is 1.
So is the value in B 28, so is the value in B 33, B38, B 43 and so forth ad infinitum... Or so it feels.
I need to edit all those values to 0.
View 9 Replies
View Related
Jan 19, 2008
I am newer here and I want a macro in mentioned title. I have a number in column a2 and in column b2 quantity if in column a2 number is 2101400 and in column b2 i write quantity 50 so said number automatically fill series in column a like mentioned below...
View 9 Replies
View Related
Jun 10, 2008
I have the following syntax in B1: "1,2,3,5,6". and I need VBA to take the very last number out of that list, and increase by four in single steps. For example: before the code: "1,2,3,5,6" and then after it "1,2,3,5,6,7,8,9." The code must be flexible, though, because it will be running within another Macro, and it must work whether the last number in the list is 1 digit ("...4,5,8"), 2 digit ("...34,35,36") or 3 digit ("...111, 113, 114"). Those three examples would be changed into "...4,5,8, 9, 10, 11" "...34,35,36, 37, 38, 39" "...111, 113, 114, 115, 116, 117".
View 4 Replies
View Related