Formula that shows either name or id from its number.

Kartiksvn

New Member
Joined
Dec 31, 2018
Messages
26
Office Version
  1. 2019
Platform
  1. Windows
numbernameid
1aaa1234
2bbb
3ccc1111
4ddd
5eee5678

I want a formula that shows either name or id from its number. If id is empty then shows name like below. I wanna put formula in 'name/id' column.

numbername/id
2bbb
11234
55678
4ddd

Thank you in advance and i really need help on this.
 
also provide the screenshot of the source table. you haven't provided the screenshot of the area where the issue arises.
P.S.: Along with bank name, where is the ID number column and the other column where you see the special characters and all
 
Upvote 0

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
also provide the screenshot of the source table. you haven't provided the screenshot of the area where the issue arises.
P.S.: Along with bank name, where is the ID number column and the other column where you see the special characters and all
Consider ID as a Bank name. I used ID to explain everyone. But there is no ids only bank name. Wait, I upload full sheet that I made for salary.
 
Upvote 0
SAMPLE 2021.xlsx
ABCDEFGHIJKLMNOP
1AUGUST*(2021)
2ABNAME (A-B)BANK NAMEIFSC CODEA/C NO.પગાર દિવસો કલાકએવરેજ ટોટલ જુનો ઉપાડજમાનવો ઉપાડઉછીના જમાબોનસટોટલ
31ALPESH CHAMARADIICIC0006550CASH25,000961.54---
42MEHUL CHAMARADI0CASH25,000961.54---
53MILAN CHAMARADI0CASH15,000576.92---
64SUNIL CHAUHAN (ASSORT)ICIC000655065500150332826,5001,019.23---
75SHAILESHBHAI B. JANI (ASSORT) ICIC000655065500150332923,000884.62---
86KISHORBHAI JETHAVA (ASSORT) ICIC000655065500150408815,000576.92---
97JITENDRABHAI JETHAVA (ASSORT) ICIC000655065500150396015,500596.15---
108GOPAL B. CHAUHAN (ASSORT)ICIC000655065500170185316,000615.38---
119KETAN CHAUHAN (ASSORT)ICIC000655002720152132218,000692.31---
1210RASIKBHAI G. JASOLIYA (ASSORT)ICIC000655065500170186319,000730.77---
1311PARESHKUMAR B. GOHIL (ASSORT)ICIC000655065500150553317,000653.85---
1412RAJUBHAI G. KADOLIYA (ASSORT)ICIC000655065500170185024,000923.08---
1513RAJUBHAI BARAIYA (ASSORT) ICIC000655065500150339717,500673.08---
1614GOPALBHAI C. CHAUHAN (ASSORT)ICIC000655002720152132417,500673.08---
1715DINESHBHAI V. PARMAR (ASSORT) ICIC000655065500150408220,000769.23---
1816DHARMESH DAVE (ASSORT)0CASH22,500865.38---
1917BHAVESHBHAI M. CHOTALIYA (ASSORT)ICIC000655002720152132324,000923.08---
2018TUSHARBHAI CHAUHAN (MARKER)0CASH16,000615.38---
2119HASAMUKHBHAI D. DABHI (MARKER) ICIC000655065500150408316,000615.38---
2220JITENDRABHAI SHAH (ASSORT) ICIC000655065500150408114,500557.69---
2321DAYABHAI SOLANKI (MARKER) ICIC000655065500150402624,500942.31---
2422RAVIBHAI DIHORA (ASSORT)ICIC000655065500150200427,0001,038.46---
2523MEHULBHAI P. MONKA (MARKER)ICIC000655065500170184819,000730.77---
2624DILIPBHAI M. JALIYA (MARKER)ICIC000655002720152132317,000653.85---
2725HARDIK B. BHATTI (MARKER)ICIC000655065500170182820,500788.46---
2826----
2927----
3028----
3129----
3230----
3331AJAY N. DABHI (PLATE)ICIC000655065500170192717,000653.85---
3432KIRANBEN SOLANKI (GAUGE)ICIC00065506550015039627,000269.23---
3533RAJNIK MENIYA (GAUGE)ICIC00065506550017018628,000307.69---
3634KRISHNA BARAD (PLATE)0CASH14,500557.69---
3735ANAND GOHEL (GAUGE)0CASH4,000153.85---
3836ANIL SARVAIYA (PLATE)ICIC000655065500170192611,000423.08---
3937AJAY MER (PLATE)0CASH13,500519.23---
4038JAYESH R. DABHI (GAUGE)0CASH5,000192.31---
4139HARDEV DUDHREJIYA (GAUGE)0CASH5,000192.31---
4240----
43-------
A-B
Cell Formulas
RangeFormula
I3:I42I3=SUM(F3/26)
J3:J42J3=SUM(G3*I3)+(I3/10.5*H3)
M3:M42M3=SUM(K3-L3)
P3:P42P3=MROUND(SUM(J3-L3-N3+O3),10)
J43:P43J43=SUM(J3:J42)


sheet for data entry.

and below sheet for salary slip.

SAMPLE 2021.xlsx
ABCDEFGHIJKLMN
1
2ABALPESH CHAMARADIદિવસો0X961.54=0
31AUGUST*(2021)શીખાવ ના જમા -કલાક0X91.58=0
4# દરેક સ્ટાફ મેમ્બરો નો પગાર વધારો જાન્યુઆરી મહિના ના પગાર વખતે જ થશે.ટોટલ=0
5# આથી પગાર વધારા માટે ચાલુ વર્ષ કે દિવાળી પર કોઈએ રજૂઆત કરવી નહિ.જુના ઉપાડ 0માંથી બાદ-0
6# નવા શીખાવ નો બે મહિના નો પગાર જમા રહેશે તથા બે વર્ષ બાદ જ મળશે.પાસેથી ઉછીના લીધેલા જમા-0
7BANK NAMEALPESH CHAMARADIહાથ માં મળેલ રકમ =0
8A/C NO.CASHનવા મહિનામાં ઉપાડ બાકી રહયો=0
9IFSC CODEICIC0006550બોનસ0બેંક0કેશ0
10
11ABMEHUL CHAMARADIદિવસોCASHX0.00=#VALUE!
122AUGUST*(2021)શીખાવ ના જમા -કલાક25000X0.00=0
13# દરેક સ્ટાફ મેમ્બરો નો પગાર વધારો જાન્યુઆરી મહિના ના પગાર વખતે જ થશે.ટોટલ=#VALUE!
14# આથી પગાર વધારા માટે ચાલુ વર્ષ કે દિવાળી પર કોઈએ રજૂઆત કરવી નહિ.જુના ઉપાડ 962માંથી બાદ-0
15# નવા શીખાવ નો બે મહિના નો પગાર જમા રહેશે તથા બે વર્ષ બાદ જ મળશે.0પાસેથી ઉછીના લીધેલા જમા-0
16BANK NAME0હાથ માં મળેલ રકમ =0
17A/C NO.નવા મહિનામાં ઉપાડ બાકી રહયો=0
18IFSC CODE0બોનસ0બેંક0કેશ0
19
20ABMILAN CHAMARADIદિવસોCASHX0.00=#VALUE!
213AUGUST*(2021)શીખાવ ના જમા -કલાક15000X0.00=0
22# દરેક સ્ટાફ મેમ્બરો નો પગાર વધારો જાન્યુઆરી મહિના ના પગાર વખતે જ થશે.ટોટલ=#VALUE!
23# આથી પગાર વધારા માટે ચાલુ વર્ષ કે દિવાળી પર કોઈએ રજૂઆત કરવી નહિ.જુના ઉપાડ 577માંથી બાદ-0
24# નવા શીખાવ નો બે મહિના નો પગાર જમા રહેશે તથા બે વર્ષ બાદ જ મળશે.0પાસેથી ઉછીના લીધેલા જમા-0
25BANK NAME0હાથ માં મળેલ રકમ =0
26A/C NO.નવા મહિનામાં ઉપાડ બાકી રહયો=0
27IFSC CODE0બોનસ0બેંક0કેશ0
28
29ABSUNIL CHAUHAN (ASSORT)દિવસો7E+11X0.00=0
304AUGUST*(2021)શીખાવ ના જમા -કલાક26500X0.00=0
31# દરેક સ્ટાફ મેમ્બરો નો પગાર વધારો જાન્યુઆરી મહિના ના પગાર વખતે જ થશે.ટોટલ=0
32# આથી પગાર વધારા માટે ચાલુ વર્ષ કે દિવાળી પર કોઈએ રજૂઆત કરવી નહિ.જુના ઉપાડ 1,019માંથી બાદ-0
33# નવા શીખાવ નો બે મહિના નો પગાર જમા રહેશે તથા બે વર્ષ બાદ જ મળશે.0પાસેથી ઉછીના લીધેલા જમા-0
34BANK NAME0હાથ માં મળેલ રકમ =0
35A/C NO.નવા મહિનામાં ઉપાડ બાકી રહયો=0
36IFSC CODE0બોનસ0બેંક0કેશ0
37
38ABSHAILESHBHAI B. JANI (ASSORT) દિવસો7E+11X0.00=0
395AUGUST*(2021)શીખાવ ના જમા -કલાક23000X0.00=0
40# દરેક સ્ટાફ મેમ્બરો નો પગાર વધારો જાન્યુઆરી મહિના ના પગાર વખતે જ થશે.ટોટલ=0
41# આથી પગાર વધારા માટે ચાલુ વર્ષ કે દિવાળી પર કોઈએ રજૂઆત કરવી નહિ.જુના ઉપાડ 885માંથી બાદ-0
42# નવા શીખાવ નો બે મહિના નો પગાર જમા રહેશે તથા બે વર્ષ બાદ જ મળશે.0પાસેથી ઉછીના લીધેલા જમા-0
43BANK NAME0હાથ માં મળેલ રકમ =0
44A/C NO.નવા મહિનામાં ઉપાડ બાકી રહયો=0
45IFSC CODE0બોનસ0બેંક0કેશ0
46
47ABKISHORBHAI JETHAVA (ASSORT) દિવસો7E+11X0.00=0
486AUGUST*(2021)શીખાવ ના જમા -કલાક15000X0.00=0
49# દરેક સ્ટાફ મેમ્બરો નો પગાર વધારો જાન્યુઆરી મહિના ના પગાર વખતે જ થશે.ટોટલ=0
50# આથી પગાર વધારા માટે ચાલુ વર્ષ કે દિવાળી પર કોઈએ રજૂઆત કરવી નહિ.જુના ઉપાડ 577માંથી બાદ-0
51# નવા શીખાવ નો બે મહિના નો પગાર જમા રહેશે તથા બે વર્ષ બાદ જ મળશે.0અપ્પુભાઈપાસેથી ઉછીના લીધેલા જમા-0
52BANK NAME0હાથ માં મળેલ રકમ =0
53A/C NO.નવા મહિનામાં ઉપાડ બાકી રહયો=0
54IFSC CODE0બોનસ0બેંક0કેશ0
A-B SLIP
Cell Formulas
RangeFormula
B2,B47,B38,B29,B20,B11B2=VLOOKUP(A3,'A-B'!$A$3:$P$42,2)
B3B3='A-B'!A1
J2J2=VLOOKUP(A3,'A-B'!$A$3:$P$42,7)
J3J3=VLOOKUP(A3,'A-B'!$A$3:$P$42,8)
L2L2=VLOOKUP(A3,'A-B'!$A$3:$P$42,9)
L3,L48,L39,L30,L21,L12L3=(L2/10.5)
K5K5=VLOOKUP(A3,'A-B'!$A$3:$P$42,11)
C7C7=IF(VLOOKUP(A3,'A-B'!A3:P42,3,0),VLOOKUP(A3,'A-B'!A3:P42,3,0),VLOOKUP(A3,'A-B'!A3:P42,2,0))
C8C8=VLOOKUP(A3,'A-B'!$A$3:$P$42,5)
N47:N48,N38:N39,N29:N30,N20:N21,N11:N12,N2:N3N2=(J2*L2)
N4,N49,N40,N31,N22,N13N4=MROUND(SUM(N2:N3),10)
N5N5=VLOOKUP(A3,'A-B'!$A$3:$P$42,12)
N6N6=VLOOKUP(A3,'A-B'!$A$3:$P$42,14)
N7N7=VLOOKUP(A3,'A-B'!$A$3:$P$42,16)
N8N8=VLOOKUP(A3,'A-B'!$A$3:$P$42,13)
C9C9=VLOOKUP(A3,'A-B'!$A$3:$P$42,4)
G9G9=VLOOKUP(A3,'A-B'!$A$3:$P$42,15)
K9K9=SUMIFS('BANK SALARY'!$E$2:$E$207,'BANK SALARY'!$C$2:$C$207,C8)
M9M9=SUMIFS('BANK SALARY'!$F$2:$F$207,'BANK SALARY'!$C$2:$C$207,C8)
A11,L54,J54,I53,K52,J51,F54,F51:F52,A49:A54,I50,E48,B48,L49:L50,M47:M53,K47:K48,I47:I48,A47,L45,J45,I44,K43,J42,F45,F42:F43,A40:A45,I41,E39,B39,L40:L41,M38:M44,K38:K39,I38:I39,A38,L36,J36,I35,K34,J33,F36,F33:F34,A31:A36,I32,E30,B30,L31:L32,M29:M35,K29:K30A11=A2
J11,J47,J38,J29,J20J11=VLOOKUP(A12,'A-B'!$A$3:$P$42,5)
J12,J48,J39,J30,J21J12=VLOOKUP(A12,'A-B'!$A$3:$P$42,6)
L11,L47,L38,L29,L20L11=VLOOKUP(A12,'A-B'!$A$3:$P$42,7)
K14,K50,K41,K32,K23K14=VLOOKUP(A12,'A-B'!$A$3:$P$42,9)
N14,N50,N41,N32,N23N14=VLOOKUP(A12,'A-B'!$A$3:$P$42,10)
C18,C54,C45,C36,C27C18=VLOOKUP(A12,'A-B'!$A$3:$P$42,3)
G18,G54,G45,G36,G27G18=VLOOKUP(A12,'A-B'!$A$3:$P$42,13)
N15,N51,N42,N33,N24N15=VLOOKUP(A12,'A-B'!$A$3:$P$42,12)
N16,N52,N43,N34,N25N16=VLOOKUP(A12,'A-B'!$A$3:$P$42,14)
N17,N53,N44,N35,N26N17=VLOOKUP(A12,'A-B'!$A$3:$P$42,11)
K18,K54,K45,K36,K27K18=SUMIFS('BANK SALARY'!$E$2:$E$207,'BANK SALARY'!$C$2:$C$207,C18)
M18,M54,M45,M36,M27M18=SUMIFS('BANK SALARY'!$F$2:$F$207,'BANK SALARY'!$C$2:$C$207,C18)




I just adjust formula for AB 01 only but I'm stuck on bank name, then I copy paste whole slip on another slips.
Hope you understand now. Consider ID of my first example as a BANK NAME in my sheet. Thank you.
 
Upvote 0
So there are three columns for output that we look for? 1)BANK NAME 2)IFSC CODE 3) A/C NO. or do we look for more columns apart from these?
What will be the preference order?
 
Upvote 0
So there are three columns for output that we look for? 1)BANK NAME 2)IFSC CODE 3) A/C NO. or do we look for more columns apart from these?
What will be the preference order?
Yes, that three column are important, but I only want a formula for C7 cell which is only bank name. Because I have already vlookup formulas for ifsc code and account number.
 
Last edited:
Upvote 0
Yes, that three column are important, but I only want a formula for C7 cell which is only bank name. Because I have already vlookup formulas for ifsc code and account number.
So there are three columns for output that we look for? 1)BANK NAME 2)IFSC CODE 3) A/C NO. or do we look for more columns apart from these?
What will be the preference order?
So your suggested formula is great but it is working on name column as a text and bank name column as a numeric. That why it can't show bank name if I input anything.
 
Upvote 0
OK, in that case, you can try this.

i just modifed your formula in C7 from Post#13.

=IF(VLOOKUP(A3,'A-B'!A3:P42,3,0)="",VLOOKUP(A3,'A-B'!A3:P42,2,0),VLOOKUP(A3,'A-B'!A3:P42,3,0))
 
Upvote 0
OK, in that case, you can try this.

i just modifed your formula in C7 from Post#13.

=IF(VLOOKUP(A3,'A-B'!A3:P42,3,0)="",VLOOKUP(A3,'A-B'!A3:P42,2,0),VLOOKUP(A3,'A-B'!A3:P42,3,0))
Oh thank you so much. this works. Now I can modify others too. Thank you so much Sirrr ???????
 
Upvote 0

Forum statistics

Threads
1,214,951
Messages
6,122,442
Members
449,083
Latest member
Ava19

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