List of names

alliswell

Board Regular
Joined
Mar 16, 2020
Messages
194
Office Version
  1. 2007
Platform
  1. Windows
  2. Mobile
In excel 2007
I have a database and in column A i have names database. I want to list the name of sam in column G to know how much times he had purchased goods

Thanks
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Upvote 0
you may be able to use a countif()
but i dont know how the data is layed out

i assume in column A - sam will appear each time he/shee makes a purchase - or do you have a quantity column ??

just to count how many times sam appears in column A

in column G put

=Countif(A1:A10000, "sam")
change the range to match the rows or more

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

This will possibly enable a quicker and more accurate solution for you.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC

then put the sample spreadsheet onto a share

I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed

Make sure you set any share or google to share to everyone
 
Upvote 0
something like this?

Cell Formulas
RangeFormula
G2:G6G2=IFERROR(INDEX($A$2:$A$100, MATCH(0, COUNTIF($G$1:G1, $A$2:$A$100), 0)), "")
H2:H6H2=IF(G2<>"", COUNTIF($A$2:$A$100, G2), "")
A2:A20A2="Name "& RANDBETWEEN(1,5)
Assume i have data in column A, in g1 i will type name of person for example sam, then excel must search number of sam in column A and show in column g2:g100 suppose excel found 6 sam so it must show 6 sam in column g2:g100
Sam
Sam
Sam
Sam
Sam
Sam
 
Upvote 0
ok, try this

Book1
ABCDEFG
1samsam
2samsam
3samsam
4samsam
5othersam
6samsam
7othersam
8samsam
9samsam
10sam 
11other 
12other 
13other 
14other 
15sam 
Sheet1
Cell Formulas
RangeFormula
G2:G15G2=IF(ROW(A2)<=COUNTIF(A:A,$G$1),$G$1,"")
 
Upvote 0
ok, try this

Book1
ABCDEFG
1samsam
2samsam
3samsam
4samsam
5othersam
6samsam
7othersam
8samsam
9samsam
10sam 
11other 
12other 
13other 
14other 
15sam 
Sheet1
Cell Formulas
RangeFormula
G2:G15G2=IF(ROW(A2)<=COUNTIF(A:A,$G$1),$G$1,"")
Thanks alan. Its working but a minor mistake. In column G when i copy n drag formula downwards, it displays only 8 sams instead of 9 excluding G1. If it includes G1 too then its perfect. But suppose i put my lookup cell in b1 and results in column G, then it will display only 8 sams instead of 9. It must exclude g1 and give results 9 sams. Thankyou
 
Upvote 0
ok, try this

Book1
ABCDEFG
1samsam
2samsam
3samsam
4samsam
5othersam
6samsam
7othersam
8samsam
9samsam
10sam 
11other 
12other 
13other 
14other 
15sam 
Sheet1
Cell Formulas
RangeFormula
G2:G15G2=IF(ROW(A2)<=COUNTIF(A:A,$G$1),$G$1,"")
Thanks alan. Its working but a minor mistake. In column G when i copy n drag formula downwards, it displays only 8 sams instead of 9 excluding G1. If it includes G1 too then its perfect. But suppose i put my lookup cell in b1 and results in column G, then it will display only 8 sams instead of 9. It must exclude g1 and give
Try

Credit @AlanY

Book6
ABCDEFGH
1samsam
2samsam
3samsam
4samsam
5othersam
6samsam
7othersam
8samsam
9samsam
10samsam
11other 
12other 
13other 
14other 
15sam 
16
Sheet1
Cell Formulas
RangeFormula
G2:G15G2=IF(ROW(A2)<=COUNTIF(A:A,$G$1)+1,$G$1,"")
Thanks guys its working.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,327
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top