# Autofill based on data in other columns

1. ## Autofill based on data in other columns

Hello... How do I explain...

Here's my data.... two columns

TS00005000 P
TS00005000 S
TS00005001 P
TS00005001 S
TS00005001 S
TS00005002 P
TS00005002 S

I am looking for a formula that will look at both pieces of data on each row and bring in the following....

TS00005000 P 1 OF 4
TS00005000 S 2 OF 4
TS00005001 P 1 OF 4
TS00005001 S 2 OF 4
TS00005001 S 3 OF 4
TS00005002 P 1 OF 4
TS00005002 S 2 OF 4

Any ideas? Appreciate it greatly! Thanks.

2. ## Re: Autofill based on data in other columns

Try in C1 & copy down.

=A1&B1&COUNTIF(\$A\$1:A1,A1) & " "&"Of 4"

3. ## Re: Autofill based on data in other columns

Hey. Thanks for the quick response. I didn't explain well enough. I don't want the contents of A1 and B1 in C1. I just want Excel to look at both pieces of data and input 1 of 4, 2 of 4, 3 of 4, etc. then reset back to 1 of 4 when the data changes. If you look below, Count the P's and S's. The order count differs. If there is one P, then the line should read 1 of 1. If there is one P and two S's, it should read accordingly. See below. Thanks again!

TS00005000 P 1 of 1
TS00005001 P 1 of 4
TS00005001 S 2 of 4
TS00005001 S 3 of 4
TS00005001 S 4 of 4
TS00005002 P 1 of 2
TS00005002 S 2 of 2

4. ## Re: Autofill based on data in other columns

You get better help, if you post an Excel file, without confidentional information.

5. ## Re: Autofill based on data in other columns

Sorry. No sense for me.

Here ya go!

7. ## Re: Autofill based on data in other columns

See the attached file.

8. ## Re: Autofill based on data in other columns

That will work! Thank you very much for your time.

9. ## Re: Autofill based on data in other columns

will you mark the question as solved, if the question is solved.

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1