Show the value on the column depending on the given value from another column

mark692

Active Member
Joined
Feb 27, 2015
Messages
321
Office Version
  1. 2016
Platform
  1. Windows
I want a formula that i will put on remarks column, I want it to show the name of the leader from column "Leader" depending on what team the name belong. I have a sample table below. On my example team orange has a leader James thats why on the column remarks James appear depending on the coresponding team name from column "Team". thanks

Book1
ABC
1TeamLeaderRemarks
2OrangeJamesJames
3orangeJames
4orangeJames
5OrangeJames
6AppleMimiMimi
7AppleMimi
8AppleMimi
9GrapesLarryLarry
10GrapesLarry
11GrapesLarry
12GrapesLarry
Sheet1
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
i tried it on my actual table this error appear sir "sort method or Range class failed"
That is the danger when you post an example that may not accurately reflect you actual file - the solution is geared toward the example you posted (as we have nothing else to go on).
I often advise people not to oversimplify the problem for our sake. Otherwise, you may get a solution that works for the question you asked, but not for the real problem that you have.

I would recommend posting a sample of the real file here, and we will see if we can adapt the solution to work for your actual data.
 
Upvote 0
do i have to upload my file? or this will do?


payables.xlsm
ABCDEFGHIJKLMNOPQR
1
2
3
4DateFor Invoicing of DRDRSInameType Of paymentCredit memoTypeReference No.Check Bankcheck no.check dateamountVoucher No.Group CodePosted OnVoucher No. GroupDebited To bank
56/27/2066935RYC NCCheckMetrobank48992894929/29/202018,235.711 SI110/29/20 16:03
6RYC NC2307164.29110/29/20 16:03
77/10/20Syspr Tr & Srvc CntrCheckMetrobank489929799111/17/202038,338.971 DR210/30/20 13:40
87/11/205006Syspr Tr & Srvc CntrCheckMetrobank489929799211/18/202038,338.97210/30/20 13:40
97/16/205188-sysSyspr Tr & Srvc CntrCheckMetrobank489929799411/19/202038,338.97210/30/20 13:40
107/10/204974Syspr Tr & Srvc CntrCredit Memo1230711/7/20203,635.30210/30/20 13:03
117/10/20Syspr Tr & Srvc CntrCredit Memo2230711/7/20201,349.78210/30/20 13:11
127/22/205440Syspr Tr & Srvc Cntr210/30/20 13:40
137/23/205507Syspr Tr & Srvc Cntr210/30/20 13:40
147/27/205662Syspr Tr & Srvc Cntr310/30/20 13:40
157/24/205558Syspr Tr & Srvc CntrCheckMetrobank489929799411/24/202022,086.502 DR310/30/20 13:40
167/27/205652Syspr Tr & Srvc CntrCheckMetrobank489929799511/25/202022,086.50310/30/20 13:40
177/29/205778Syspr Tr & Srvc Cntr310/30/20 13:40
187/23/202889P Blu Whl Crprtn410/30/20 13:56
197/27/202916P Blu Whl Crprtn410/30/20 13:56
207/9/202757P Blu Whl CrprtnCheckMetrobank489929799610/20/202023,454.082 SI410/30/20 13:56
21P Blu Whl Crprtn230710/20/2020211.30410/30/20 13:56
227/25/203667Mrn Lzs Tr CntrCash2,279.463 SI510/30/20 17:00
23Mrn Lzs Tr Cntr23077/25/202020.54510/30/20 17:00
247/23/2067247RYC NCCheckMetrobank489929799710/22/202027,561.694 SI610/30/20 17:10
25RYC NC23077/24/2020248.30610/30/20 17:10
268/25/2067558RYC NC710/30/20 17:10
278/11/2067422RYC NCCheckMetrobank489929799811/17/202033,379.285 SI710/30/20 17:10
288/18/2067533RYC NCCheckMetrobank489929799911/18/202033,379.28710/30/20 17:10
29RYC NC23078/11/2020601.43710/30/20 17:10
307/25/2010632Tywst MrktngCredit Memo3230711/25/20203,125.00810/31/20 10:06
318/25/2010557cml Cmpny, ncCash5,864.166 SI910/31/20 12:48
32cml Cmpny, nc23078/25/202052.83910/31/20 12:48
330cml Cmpny, nc23078/27/2020285.801010/31/20 12:54
348/27/2010565cml Cmpny, ncCheckMetrobank48992799558/27/202031,724.207 SI1010/31/20 12:54
358/26/2020704CT CRTCH NCCheckMetrobank489929791912/24/202033,680.578 SI1110/31/20 13:43
36CT CRTCH NC230712/24/2020303.431110/31/20 13:43
378/14/20107466ng h Tub Crprtn1210/31/20 13:43
388/4/20107330ng h Tub CrprtnCheckMetrobank489929791111/12/202025,979.949 SI1210/31/20 13:43
39ng h Tub Crprtn23078/11/2020234.051210/31/20 13:43
408/11/201.01E+08Sun Mstr Sls Crp1310/31/20 16:36
418/24/201.01E+08Sun Mstr Sls Crp1310/31/20 16:36
428/5/201.01E+08Sun Mstr Sls CrpCheckMetrobank489929791210/15/202032,526.9610 SI1310/31/20 16:36
43Sun Mstr Sls Crp23078/7/2020293.041310/31/20 16:36
4411/2/201120200003CMR8 Tugh Tyr CrprtnCheckMetrobank489928949911/2/202025,336.003 DR1411/2/20 10:54
458/28/2032040Mult-Brn Qulty Trng CrpCredit Memo4230712/28/20205,178.571410/31/20 16:49
4611/2/209897Syspr Tr & Srvc CntrCheckMetrobank489929791411/2/202022,440.004 DR1511/2/20 14:16
478/4/2025923Syspr Tr & Srvc CntrCredit Memo523071-Jan-001527812/2/20203,229.911611/3/20 15:29
488/5/200540LGC Tr SupplyCash40,832.1411 SI1711/3/20 15:44
49LGC Tr Supply23078/5/2020367.861711/3/20 15:44
507/2/209181strnc Mult Tr Crprtn1811/4/20 15:54
517/7/209294strnc Mult Tr Crprtn1811/4/20 15:54
527/1/209065strnc Mult Tr CrprtnCheckMetrobank489929791511/5/2020203,921.005 DR1811/4/20 15:54
537/8/209418strnc Mult Tr Crprtn1811/4/20 15:54
547/9/209494strnc Mult Tr Crprtn1811/4/20 15:54
557/13/209596strnc Mult Tr Crprtn1811/4/20 15:54
56
Payment
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F25:G55,E56:E1048576Cell Value<0textNO
A5:R55Expression=$O4<>$O5textNO
B56:B1048576,C25:C55Cell ValueduplicatestextNO
D5:D55Cell ValueduplicatestextNO
C5:C55Cell ValueduplicatestextNO
K5:K55Cell ValueduplicatestextNO
Cells with Data Validation
CellAllowCriteria
F5:F55List=$AH$1:$AH$6
 
Upvote 0
The issue is that your columns are all different than the ones in your example (which columns the key data exists in).
I purposely documented my code to tell you exactly what is going on, so you should be able to make those column adjustments yourself.
Have you tried doing that? If not, please try now. It is good practice and should help you understand exactly what the code is doing.

If you still run into trouble, post your updated code, and I will help you fix it up.
 
Upvote 0

Forum statistics

Threads
1,215,537
Messages
6,125,390
Members
449,222
Latest member
taner zz

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