Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Problem with macros

Can someone help me with this problem? The task is something like
this. In one row we have some codes, like a,a,a, b, c, c, d, e, e, e.
In another row I have to mark them so that every code that is unique
has number 1 next to it, and the one that is repeating must have
numbers from 1 to something, depends on the number of repeatings. So
in my case it would look lik this.
1st row 2nd row
a 1
a 2
a 3
b 1
c 1
c 2
d 1
e 1
e 2
e 3
Can please someone make me a macro for this? Thanks,
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default Problem with macros

you dont need a macro in fact...
here is the situation:

header(A1) counter(B1)
a =IF(A2<A1;1;1+B1)
a copy formula seen above
etc


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Problem with macros

On 12 pro, 09:56, "Snake Plissken"
wrote:
you dont need a macro in fact...
here is the situation:

header(A1) counter(B1)
a =IF(A2<A1;1;1+B1)
a copy formula seen above
etc


It works! Thank you!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Problem with macros

B1: =COUNTIF(A:A,A1)

and copy down

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Snake Plissken" wrote in message
...
you dont need a macro in fact...
here is the situation:

header(A1) counter(B1)
a =IF(A2<A1;1;1+B1)
a copy formula seen above
etc




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default Problem with macros

no problem - of course data stored in first column has to be sorted with
ascendindg or descending mode before copying the formula, and everything can
be done by macro, however task is simple so we can "avoid" a macro ;)




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default Problem with macros

A slight modification to your formula in order to produce the numbers the OP
asked for originally...

B1: =COUNTIF($A$1:A1,A1)

...and copy down

Rick


"Bob Phillips" wrote in message
...
B1: =COUNTIF(A:A,A1)

and copy down

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)

"Snake Plissken" wrote in message
...
you dont need a macro in fact...
here is the situation:

header(A1) counter(B1)
a =IF(A2<A1;1;1+B1)
a copy formula seen above
etc





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
Problem with Macros Lynda Excel Discussion (Misc queries) 2 April 9th 08 01:15 PM
Macros Problem Gary Excel Discussion (Misc queries) 3 September 17th 07 03:08 PM
Problem with Macros! buzzharley Excel Programming 4 June 29th 06 06:28 PM
Macros problem with XP Gretchen Hembree Excel Programming 3 June 21st 05 01:51 PM
Problem with macros on Mac ErikW Excel Programming 1 December 2nd 03 07:31 AM


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

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

About Us

"It's about Microsoft Excel"