Help me in coding formula....

doms123

Board Regular
Joined
Apr 19, 2011
Messages
58
i am using excel2007 and i'm making a database system here is want...

this is my first sheet, the input sheet.


Excel Workbook
ABCDEFGH
1
2Code No.
3DEPARTMENTS
4DepartmentHR
5SL for Sales
6Project TitleMK for Marketing
7FN for Finance
8Created byOP for Operations
9
10Date Created
11MonthDayYear
12
13ENCODE
14
15
Input Sheet


then this is my masterlist sheet

Excel Workbook
ABCDEFG
1Date Created
2Code No.DepartmentProject TitleCreated byMonthDateYear
3HR-001HRHR ONECREATOR 1JUNE42010
4HR-002HRHR TWOCREATOR 2JULY42010
5SL-001SLSL ONECREATOR 3DECEMBER52010
6OP-001OPOP ONECREATOR 4SEPTEMBER62010
7SL-002SLSL TWOCREATOR 5AUGUST192010
8MK-001MKMK ONECREATOR 6NOVEMBER202010
9
10
11
12
Sheet2


my problem is what will be the formula(maybe a count formula, at cell C2 of the input sheet) that counts the code like in the masterlist, if i input another entry for HR Department it will be HR-003 and of I input an entry for Finance it will be FN-001. I want to be auto generated of number, if i input a department then it will generate the next number that based on the number that shown in the masterlist.

Please Help me!!!
Thank you in advance....
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hello

=C4&TEXT(COUNTIF(Sheet2!B3:B10,C4)+1,"-000")
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,844
Members
452,948
Latest member
UsmanAli786

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