# Macro For Putting Index Reference Numbers In Numerical Sequence?

Nov 12, 2012

I have a document that is a subject index for book that has terms that reference page numbers. The structure is for example: Employment, 587, 592, 553, 605, 233 The term is always following by comma and then space and listing of page numbers that subject reference applies. In many cases the page number references are out of sequence and I need them to be in numerical sequence. i.e. Employment, 233, 553, 587, 592, 605 There are many subject terms in index and need to check and fix sequence of page references for each.

## Macro Instruction To Copy Down Sequence Of Numbers

Dec 24, 2013

I'm use to highlighting two cells, find the plus, and copying a list of numbers down about 10 rows. Is there a macro instruction or VB instruction that will do the same?

Example,

Before:

G1010
G1011

After:

G1010
G1011
G1012
G1013
G1014
G1015
G1016
G1017
G1018
G1019
G1010
G1011

## Putting Index Column - VLookup Does Not Pick Up Dates?

Apr 5, 2014

does it not like dates? i have columns of data and i wish to search it for each month and then print a months worth. here is part of the data. maybe vlookup does not like dates? i tried putting an index column on the left, 1,2,3,4... but it still would not pick up "Jun"

## Sequence Based On Column A Index

Sep 18, 2006

I am stuck on what should be a simple formula. I have a spreadsheet that is sorted by "target" number in column A, basically 1,2,3,4. I am trying to create a formula that will increase the number in column B by one based on column A. So when the value in column A changes column B will reset to 1. Also I need this sequence number to be preceded by zeros up to 0999. So 1 would be 0001 and 895 would be 0895.

## Drag Sequence Having Sheet Reference?

Oct 4, 2013

I would like this formula to increase down the column as follows:

=Temp_Data!A1
=Temp_Data!A5
=Temp_Data!A9

Sequence is addidng 4 each time... Dragging results with:

=Temp_Data!A1
=Temp_Data!A5
=Temp_Data!A9
=Temp_Data!A4
=Temp_Data!A8
=Temp_Data!A12

I have seen the following work for others:

=INDEX(A:A, (ROW()*2)-1)

Can a macro be created to store the number as a variable and loop a certain amount of times adding four to that variable every time?

## How To Automate Sequence Of Numbers

Jul 25, 2014

I'm trying to automate a sequence.

I was gonna explain it but I couldn't make myself clear so I took a screenshot:

sequence.PNG

folder_type is what the user types, (for example, the letter "A"), and folder_code is a sequence that should auto-generate according to what was manually inserted in the folder_type field.

What formula could I use for this process?

## Identify Numbers In Sequence

Aug 23, 2007

I have a task to identify all the numbers in sequence in a worksheet, how do I do that?

Ex:
Column A
1
2
3
4
5
7
9
10
11
12
13
14
15
16
20
21
22

Desired output 1-5,7,9,10-16,20-22.

## Average Numbers In Sequence

Oct 21, 2005

I have cells O1 to O300 numbers in random sequences of no more than 10

I need to average the 5 highest numbers in each sequence eg:

O P
1 2 16 (result)
2 20
3 4
4 6
5 14
6 12
7 8
8 10
9 16
10 18
11 blank cell
12 15 9 (result)
13 3
14 6
15 12
16 9
17 blank cell
18 blank cell
19 4 23 (result)
20 16
21 20
22 40
23 8
24 11
25 28
26 blank cell

down to 300 rows, the sequence of numbers can be from 1 to 10 but never
more than 10

I got a function : =IF(COUNT(O1:O10>=10,AVERAGE(LARGE(O1:O10,{1,2,3,4,5})),"
") but that works only for 10 numbers and not for less

## Highlight Numbers In Sequence

Dec 19, 2008

There are 350 numbers in a column, 7 digits in each cell. I want to see which cells have 3 or more consecutive numbers. Only looking at the last 3 digits. Example. 1960657. 1960658. 1960659. 1960660. Has 4 consecutive numbers.
Conditional formatting ? or other?

## Filling In Numbers In Sequence

Jul 29, 2009

I am trying to "auto fill" a column with numbers in sequential order. (1,2,3,4,5...) I typed in 1,2,3... in the first cells and clicked on the black corner dot to drag the sequence down. It keeps putting in 1,2,3,1,2,3,1,2,3..... I have also went into the advanced options and clicked the "enable fill handle and cell drag-and-drop" and also Alert before overwriting cells" and it still fills in 1,2,3,1,2,3....

## Count Numbers In Sequence ....

Dec 8, 2006

I have a list of random numbers in column A the number range is from 0 to 20,000. What I am trying to do is to count the sequential numbers after each random number....sorry this is not really explained well so I willl use a numeric example.

A
23
24
25
33
34
60
77
80

Above is what I have in column A you can see that my number range starts a 23 so I would like to count the sequential numbers that occur from 23 in this case it would be count(23,24,25) giving the answer 3 I would like this answer to be inserted into column B next to 23 and the numbers that were counted in this formula then be deleted as rows (i.e. where the number 24 and 25 was counted then the rows containing these numbers are deleted), The macro moves then to count the next number.

In the case of just a single number then a value of 1 is entered into the column next to the number indicating that there was only one number in that sequence.

## Writing A Macro For Work That Can Loop Through Reference Numbers

May 13, 2014

I have attached a screencap of an example source table that I am trying to write a macro to manipulate each day. Starting conditions are that I have data in column A and B. Column A would be reference numbers that may be on one line, or more likely, on multiple lines repeating with varying counts. Column B is the weight associated with each line. I would need a macro that could loop through column A, determine if the ref number has changed, and then calculate/populate column C. Column C is the % of the total weight for the unique reference number. I have illustrated this in the table using column D. This is taking me incredible manual effort to complete right now and I do know VBA, I just don't know how to loop a variable range in this case.

## Searching For Sequence Of Numbers Down A Column?

Jun 6, 2014

I was wondering whether it was possible to search for a sequence of numbers.

For example, if this is down a column:

A1: 5
A2: 4
A3: 5
A4: 6
A5: 9

Is it possible to have a find function to search for the sequence of numbers "4 + 5" and consequently highlight cells A2 and A3?

## Tell Larger Sequence Of Repeated Numbers In Row?

Nov 25, 2012

I have a table that receives the number sequence 1 and sequence number 0.

I need to calculate the highest sequence numbers that repeat in Secunia lines.

A
B
C
D
E
F
G
H
I
J
K
L

Result

1
1
1
0
0
1
0
1
0
1
1
0
3

[code].....

See for example the last line.

1 1 0 0 1 0 1 1 1 1 1 0 = 5

I have a sequence number 1, where it repeats 5 times segudamente.that is greater than other sequences.

## Arranging Numbers In Numerical Order

May 26, 2012

I'm looking for a formula that will rearrange a row of numbers in numerical order and by their last digit also in a numerical order, I hope it's clear enough !!!

2 1235781114162022273139667197110113128136139153225250328428508576772 3
4 2011025011131712227723113153145225166613657672797812832842850839139 5

## How To Convert Numerical Numbers To Words

Jun 20, 2014

how to convert numerical numbers to words in MS excel & MS world

## RANK Duplicate Numbers Without Missing In Sequence?

Jul 18, 2014

Attempting to do a spreadsheet for my golf club, to record scores, etc...

Managed to get it to pretty much what I want despite some very extreme looking formulae! So for some scores such as 56,56,57,57,54,54, Rank would just give me 3,3,5,5,1,1, so I have put a second column next to 56,56,57,57,54,54 where I input scores to seperate ties (better back nine scores), so in the above I would have for example 30,29 next to the two 56s, 27,29 next to the two 57s, and 27,28 next to the two 54s, so the rank would return 4,3,5,6,1,2. I have gone three stages further, so if, the back nine score was also tied, I have a column for the last 6 hole score, the last 3 hole score and even the last hole score. This is some serious formulae at this point. However, I now want the OPTION to rank the original data as 2,2,3,3,1,1 if I don't put any data in the back nine column.

This is so that I can input doubles scores on the same spreadsheet as singles scores, so if two people shoot the same score in singles I can input the back 9 scores etc to decide who comes out ahead, but in doubles I would just leave the back nine score blank, and then two people would share 1st in the rank, but then I need two 2nd ranks NOT 3rd ranks as it currently is.

Just so you can see how complex it is the current forumlae in the rank is here is an example:

=IF(O7="","",IF(K\$2="MEDAL",RANK(O7,O\$7:O\$255,1)
+SUMPRODUCT(--(O7=O\$7:O\$255),--(P7>P\$7:P\$255))
+SUMPRODUCT(--(O7=O\$7:O\$255),--(P7=P\$7:P\$255),--(Q7>Q\$7:Q\$255))

[Code] .....

There are other things in there to sort out a few other issues as well, but I cant see the wood for the trees so to speak, to get it todo what I want!

I have also attached a sample from my spreadsheet to better demonstrate what I want!

## Confirming If Multiple Rows Of Numbers Run In Sequence

Jun 24, 2009

I'd like Excel to run a check to see if a row of numbers runs in sequence.

*As in row 4, the numbers dont have to incriment each time
*As in row 2, there may be gaps in the data
*As in row 6, the data cant increase and then decrease. Each subsequent number must be the same or high than the previous
*There could be varying amounts of numbers per row, hence the results being in column R

As an added bonus it'd be nice to see where an error occurs, but just knowing theres an error (column R) is the primary goal.

## Find Lookup Sequence Of Numbers In Rows

Jun 27, 2012

Basically I'm trying to look up a series of numbers against a separate row of numbers and look for a match regardless or number order.

For example

If you look at the above picture I'm trying to do a query of some sort that will look up the numbers in A8:G8 in then search each row in the above table ie look for the numbers in B1:J1, B2:J2,B3:J3 etc I need to be able to search each row and look for the sequence of numbers regardless of order, if there is or inst a match for all numbers it should look at the next row and so on (maybe multiple matches). If there is a match then it should display the Name located in column "A" into cell G8. In this example to Jarrad row contains the numbers located in A8:G8. If there is no match it should display "None".

I'm trying to find any easy way to do this as I have over 500 rows I'm trying to query. The number's in A8:G8 in this example could also be more or less, ie here I have included 6 numbers but this could be 3 or 9 etc.

## Place In Sequence Increasing The Numbers Of One I Creak In A Cell

Dec 13, 2008

I would like to place in sequence increasing the numbers of one I creak in a cell.
In the formula I determine it I creak and the corresponding frame number to the placed ones.
The problem is that he is accumulated only the greater and not sequencia it.

1803456781101112
1134567810111280

but,80-80

Function ordenar2(Myrange As Range, num As Integer) As String
Dim Myorder As Double
Dim X2 As String
Dim n As Integer
n = 1
Do While n

## Lottery Search Query: Correct Sequence Of Numbers

Oct 10, 2006

I am setting up a spreadsheet with two columns. The first column will contain a persons name the second column will contain four numbers.

Name Numbers
Joe 1,3,12,24
John 4,12,23,24
Jill 6,14,19,26

I need to be able to search to find the following: the correct sequence of numbers e.g. if 1,3,12,24 were pulled out then that search is easy. If I was looking for someone who had the numbers 1,12,24 then I have a problem. I was thinking about putting the four numbers in to four separate columns but my Excel knowledge is poor.

## Find Most Common (x5) Numbers Within Numerical String Range?

Apr 2, 2014

I have a range of cells containing a string of numbers separated by ';' e.g.

COLUMN A COLUMN B
IDENTIFIER_011122;1942;2011;1869;2642;2729;2731;2655;2678;2341;2347;2354;2332;2506;1809
IDENTIFIER_021122;1942;2011;1869;2642;2729;2731;2655;2678;2207;2209;2217;2220;1880;2506;1809
IDENTIFIER_031122;1942;2011;1869;2642;2729;2731;2732;2648;2255;2207;2217;2220;2387;1880;2506;1809
IDENTIFIER_041122;1942;2011;1869;2642;2729;2731;2732;2678;2207;2209;2217;2220;1880;2506;1809
IDENTIFIER_051122;1942;1971;2011;1869;2642;2729;2731;2648;2678;2342;2354;2355;2207;2209;2217;2220;2398;1880;2506;1809
IDENTIFIER_061122;1942;2011;2169;1869;2642;2729;2731;2732;2678;2341;2343;2347;2354;2207;2209;2217;2220;1880;2506;1809
IDENTIFIER_071122;1942;2095;1869;2573;2587;2648;2655;2673;2207;2209;2220;1880;1809
IDENTIFIER_081122;1942;2095;1870;2642;2648;2673;2678;2341;1880;2506;1809

I am looking to find the top 5 most common/repeated numbers within this range. I have found a formula to work out the largest number within the range:

=MAX(IFERROR(0+TRIM(MID(SUBSTITUTE(";"&B3,";",REPT(" ",LEN(B3))),(ROW(A\$1:A\$200)*LEN(B3))-1,LEN(B3))),0)) (REF http://www.excelforum.com/excel-gene...e-numbers.html)

How to modify it to work with e.g. the mode function.

I know I could separate all the numbers out using 'text to columns' but I will need to work this out regularly on large quantities of data ...

## Formula To Extract Numbers From Alpha Numerical Entry

Jan 8, 2014

I have a sheet with thousands of rows of ID's which are made up of a series of letters, numbers, underscores and or spaces. Within the sheet there are numerous duplicates so I need to able extract the numerical element, which is the key data to be able to identify the duplicates.

The numbers I need to extract are mainly 6 and 7 digits long however don't always sit in the same place within the ID. I don't need the 3 digit number sequences, just the 6 & 7 number sequences

e.g

AB_123_456789_Jones
CD_131_7654321_Smith
AB_123_Jones_456789

I've found a formula that strips out all the numbers, however it also included the 3 digit numbers which I don't want. I've also used Text To Columns to break up the ID across a number of columns however that leaves me with 2 and sometimes 3 columns where a 6 digit ID appears

Is there a simple way to extract the number if it's a certain length? i.e. 6 or 7 digits long

## Placing Numbers In Sequence Down Rows And Duplicating If Information Matches?

Mar 7, 2013

I have 2 columns,

column A has a series of 8 digit numbers (some will match some will not) sorting in A-z order from lowest to highest value.

Column B is blank at the moment.

What I want

In column B i need to add numbers starting at 1 and moving down in sequence.

If more than one rows have the same number in column A they get the same numbe rin Column B

It's really a pain or have to hand type in the numbers and I can't figure out a easy way to do this.

Attached example.

Tab 1 = Origanl Data
Tab 2 = results i'm lookin for.

## Summing Sequence Of Numbers Seperated By Comma Within Single Cell

Mar 24, 2009

I'm a basic excel user really and cannot find a function that will allow me to complete the following:

CELL A1 includes the following sequence of numbers: 1,2,1,0,2,3
I would like to know how to put a formula/function into CELL B1 that sums up the sequence of numbers in CELL A1 (i.e 1+2+1+0+2+3)

## Putting Input Into A Macro

Apr 24, 2007

I would like to write a macro that would start by asking me something along the lines of, "Enter student # you want to print a report about." The # I enter would need to be stored as a variable in the VB code, and then my code would need to use the variable to do some search and replace operations. (Replace all instances of 10 (the default student number) with the variable I have specified).

I don't really know how to even start going about this. How do I get Excel to ask me for a variable, and then use that variable in code?

## Macro Putting In The Formula As Text Instead Of Results

May 28, 2008

My macro contains a VLookup formula that is giving me the text of the formula instead of the results. A portion of the macro is, as follows:

Sheets("Survey Results").Select
Range("c1").Value = "Resolving Group"
Range("c2").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-1],'Survey Invitation'!C[-2]:C[-1],2,FALSE)"
Range("C2").Select
Selection.AutoFill Destination:=Range("C2:C900"), Type:=xlFillDefault
Range("C2:C900").Select
Range("C2").Select

The VLookup statement appears in place of the result when the macro is run. This is Excel 2007 and it runs to the end without error.

## Index Row Reference Not Filling Down?

Jul 22, 2014

I have a workbook where one worksheet is referencing cells from another worksheet. I need every third cell to pull from every single cell on the other sheet.

I have found on other threads that =INDEX('WORKSHEET!B:B, 1*(ROW(\$B\$4:\$B\$4)+1)) worked. However when I filled down it wont increase the row reference.

ie.

=INDEX('WORKSHEET!B:B, 1*(ROW(\$B\$4:\$B\$4)+1))
=INDEX('WORKSHEET!B:B, 1*(ROW(\$B\$4:\$B\$4)+2))
=INDEX('WORKSHEET!B:B, 1*(ROW(\$B\$4:\$B\$4)+3))

[ATTACH]334142[/ATTACH

The other threads mentioned it should fill down fine, but not working for me.

## 3d Reference In An INDEX Formula

Aug 12, 2009

i'm trying to search throgh multiple sheets using an INDEX formula.

=INDEX('12.31.09:11.15.09'!\$AF\$14:\$AG\$75,MATCH(E\$2,'12.31.09:11.15.09'!\$AC\$14:\$AC\$75,0),MATCH(\$B61,' 12.31.09:11.15.09'!\$AF\$12:\$AG\$12,0))

In short, these are timesheets; in a separate sheet i'm using the above formula to find how many hrs were worked on all the other sheets for a given job# within a given date range. (in the above example, i'm only searching in timesheets between 11/15 and 12/31, but I will ultimately change that to include the entire year '12.31.09:01.15.09'). E2 is a referenced job number; B61 is a referenced date.

I'm getting a !VALUE error.
Can a 3d reference work inside an INDEX formula?

## Can Lookup Or Index Be Used To Reference To Different Cells

Jul 14, 2009

Can they be used to reference data based on data inserted into more than one cell? I have attached an example as its kind of confusing to explain.