Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
jlo jlo is offline
external usenet poster
 
Posts: 16
Default Automate finding every 15th record

I have a spreadsheet and I am trying to develop a list from that spreadsheet.
I need Excel to find the data in every 15th row in column A.

For instance Column A is Name, Column B is Address. I want to generate a
list of every name in Column A for every 15th record.

Would I need a formula, macro or code?

Thanks in advance.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Automate finding every 15th record


here's on way:

Sub test()
Dim ws As Worksheet
Dim lastrow As Long
Dim i As Long

Set ws = Worksheets("Sheet1")
lastrow = ws.Cells(Rows.Count, "A").End(xlUp).Row

With ws
For i = 1 To lastrow Step 13
MsgBox .Range("A" & i) & " " & .Range("B" & i)
Next
End With
End Sub

--


Gary

"jlo" wrote in message
...
I have a spreadsheet and I am trying to develop a list from that
spreadsheet.
I need Excel to find the data in every 15th row in column A.

For instance Column A is Name, Column B is Address. I want to generate a
list of every name in Column A for every 15th record.

Would I need a formula, macro or code?

Thanks in advance.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Automate finding every 15th record

Enter A2 (no equal sign), and below it put A17 (no equal sign).
Select both cells, use the fill handle & you'll see A32, A47, etc
Select all these, use edit/replace & replace A with =A and you're done.
Bob Umlas
Excel MVP

"jlo" wrote in message
...
I have a spreadsheet and I am trying to develop a list from that
spreadsheet.
I need Excel to find the data in every 15th row in column A.

For instance Column A is Name, Column B is Address. I want to generate a
list of every name in Column A for every 15th record.

Would I need a formula, macro or code?

Thanks in advance.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default Automate finding every 15th record

The answer to your question about whethe you need a formula, macro, or code,
most likely depends upon how often you need to do it. If you only need to do
it once, formulas will do it nicely. If you need to do it a bunch of times,
you'll want to automate it with code.

Here are two formulas that may help:

=ROW(A1)
=MOD(A1,15)

=ROW will tell you the row number of eacy line.

=MOD will result in 0 (the remainder, when the row number is divided by 15)
each time it hits a 15th row.

Hope that helps.
Mark



"jlo" wrote:

I have a spreadsheet and I am trying to develop a list from that spreadsheet.
I need Excel to find the data in every 15th row in column A.

For instance Column A is Name, Column B is Address. I want to generate a
list of every name in Column A for every 15th record.

Would I need a formula, macro or code?

Thanks in advance.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default Automate finding every 15th record

You can do it with a formula

=INDEX(A:A,(ROW(A1)-1)*15+1)

and so on

--
__________________________________
HTH

Bob

"jlo" wrote in message
...
I have a spreadsheet and I am trying to develop a list from that
spreadsheet.
I need Excel to find the data in every 15th row in column A.

For instance Column A is Name, Column B is Address. I want to generate a
list of every name in Column A for every 15th record.

Would I need a formula, macro or code?

Thanks in advance.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,344
Default Automate finding every 15th record

Hi,

don't need a formula or code, Excel has a feature to do this:
Choose Tools, Add-in, and check Analysis ToolPak if necessary
1. Choose Tools, Data Analysis, Sampling, OK
2. Indicate your colum A range in the Input Range box, if there is a title
in the top row of your selection check Labels, Choose Periodic and enter 15
for the Period, click Output Range or whatever, and indicate the top cell of
the output range in the adjacent box. Click OK.

--
Thanks,
Shane Devenshire


"jlo" wrote:

I have a spreadsheet and I am trying to develop a list from that spreadsheet.
I need Excel to find the data in every 15th row in column A.

For instance Column A is Name, Column B is Address. I want to generate a
list of every name in Column A for every 15th record.

Would I need a formula, macro or code?

Thanks in advance.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Automate finding every 15th record

As a follow up to Bob's formula, you can carry the math out on this type of
mathematical construction to simplify it a little...

=INDEX(A:A,15*ROW(A1)-14)

To get the constant (14 in this case) to adjust the formula for the starting
row, just subtract the starting row you want from 15. For example, to get
the constant for starting on row 1... 15-1=14. If you wanted to start on row
3, then 15-3=12 which means you would replace the 14 in the above formula
with 12 to get the list to start at row 3.

--
Rick (MVP - Excel)


"Bob Phillips" wrote in message
...
You can do it with a formula

=INDEX(A:A,(ROW(A1)-1)*15+1)

and so on

--
__________________________________
HTH

Bob

"jlo" wrote in message
...
I have a spreadsheet and I am trying to develop a list from that
spreadsheet.
I need Excel to find the data in every 15th row in column A.

For instance Column A is Name, Column B is Address. I want to generate a
list of every name in Column A for every 15th record.

Would I need a formula, macro or code?

Thanks in advance.




  #8   Report Post  
Posted to microsoft.public.excel.programming
jlo jlo is offline
external usenet poster
 
Posts: 16
Default Automate finding every 15th record

Awesome! Thanks.

"mark" wrote:

The answer to your question about whethe you need a formula, macro, or code,
most likely depends upon how often you need to do it. If you only need to do
it once, formulas will do it nicely. If you need to do it a bunch of times,
you'll want to automate it with code.

Here are two formulas that may help:

=ROW(A1)
=MOD(A1,15)

=ROW will tell you the row number of eacy line.

=MOD will result in 0 (the remainder, when the row number is divided by 15)
each time it hits a 15th row.

Hope that helps.
Mark



"jlo" wrote:

I have a spreadsheet and I am trying to develop a list from that spreadsheet.
I need Excel to find the data in every 15th row in column A.

For instance Column A is Name, Column B is Address. I want to generate a
list of every name in Column A for every 15th record.

Would I need a formula, macro or code?

Thanks in advance.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding the next record in a column Finding the next record in a column Excel Discussion (Misc queries) 2 October 1st 09 07:17 PM
Finding Duplicate Record in more than one column peterwhite Excel Discussion (Misc queries) 2 September 29th 08 12:56 PM
Finding and Amending a record Duncan[_5_] Excel Programming 3 December 12th 05 03:32 PM
Finding last record in month for each of several types of record. Richard Buttrey Excel Programming 5 April 4th 05 02:11 AM
Automate Finding Values/Copy to Different Sheet [email protected] Excel Programming 1 March 21st 05 06:29 PM


All times are GMT +1. The time now is 06:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"