I have a random data.
Now I want to calculate the Person who;s having maximum number of Cars.
I am trying to write a vba code to do that .
Attaching is the sample data
Please help
Thanks
Anir
I have a random data.
Now I want to calculate the Person who;s having maximum number of Cars.
I am trying to write a vba code to do that .
Attaching is the sample data
Please help
Thanks
Anir
Hi Anir,
Would it not be the count of a name from a column A which is repeated maximum time ?
Also, what if 3 person are sharing max number of car ?
In your example, following person have 4 cars each
Anir
Raghav
Rohit
Regards,
DILIPandey
<click on below * if this helps>
DILIPandey, Excel rMVP
+919810929744 (India), +971528225509 (Dubai), [email protected]
Try this..................:
Gary's Student
As I see in the file, the names always have a unique number. something like motorracing.
![]()
Please Login or Register to view this content.
Harry.
Hi Dilip,
Thanks for replying :-)
Yes it would be something like that but i am not able to write VBA Code around it,
And in case if more than 1 person is sharing top position then i would like to print all of them
Thanks
Anir
Last edited by anir_sarkar1; 12-30-2012 at 02:07 PM.
@HSV
Hi SIr,
Thanks for putting in efforts :-)
But this code is giving me result as 'Shifali' but she dont have maximum no. of cars.
Your code is catching the maximum value from column two and displaying the name against it. However column two is just a Unique Registeration Code for Person.
However Colume 3 is the name of the Car which that particular person is having
Thanks
Anir
Last edited by anir_sarkar1; 12-30-2012 at 02:12 PM.
Try it once.
![]()
Please Login or Register to view this content.
@HSV
Hi Sir,
This is giving me name of the Cars against the Reg. No. 5.
But i want the person having maximum cars
Like in attached sheet we have
Rohit = 4Cars
Raghav = 4Cars
Anir = 4Cars
Shifali = 2Cars
Sangram = 3Cars
So i want resule as Raghav anir and Rohit since they are having maximum number of Cars
Thanks
Anir
Last edited by anir_sarkar1; 12-30-2012 at 03:03 PM.
How about this code?
![]()
Please Login or Register to view this content.
Thanks Andrew![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks