LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,533
Default Re-numbering Excercise Using VBA

Hi

Try this (not tested):

Sub AAA()

counter = 1
LastRow = Range("A" & Rows.Count).End(xlUp).Row
For r = 8 To LastRow
If Not Cells(r, "P").Value = "Resigned" Then
ID = Cells(r, "A").Value
Cells(r, "A") = counter
Location = Range("J" & r).Value
Set f = Sheets(Location).Range("A:A").Find(what:=ID,
lookat:=xlWhole)
f.Value = counter
counter = counter + 1
End If
Next
End Sub

Regards,
Per

"Timbo" skrev i meddelelsen
...

I have a Base Data Workbook called Membership Book.

In Column A Starting in Row 8 there is a number unique to the data to
the right of it starting at one and going down to 964.

In Column J is an Location Identifier i.e. Blake's, Bradley, Coach
Road, Cooke's or Decoy.

In Column P is a status Resigned or otherwise.

I want a macro that will run down the status column P ignoring all of
the Resigned.

When it finds an entry which is anything other than Resigned or a blank
cell I want it to change the number in column A for that row to 1 and
remember what was originally in there say 14.

Then I want it to go to the Location Indicator in Column J. These
locations have a sheet of their own in the same format.

I then want the macro to go to the sheet for that row, select Column A
search for 14 and replace with 1.

Then go back and continue the search down the Membership Book and
allocate 2 to the next number to be changed and so on.

Is this possible?


--
Timbo
------------------------------------------------------------------------
Timbo's Profile: http://www.thecodecage.com/forumz/member.php?userid=24
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=79843


 
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
row re-numbering bonszer Excel Discussion (Misc queries) 1 September 26th 08 11:11 PM
PO with sequential numbering with start / end numbering [email protected] Excel Discussion (Misc queries) 1 April 24th 07 03:38 PM
numbering add-in Tuff Excel Programming 1 November 8th 06 01:12 PM
Numbering hayhider New Users to Excel 1 October 6th 05 05:50 AM
Numbering every second row Grant Excel Worksheet Functions 3 May 16th 05 03:37 PM


All times are GMT +1. The time now is 09: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"