Excel Show Data Based On Condition

varunwalla

New Member
Joined
Aug 13, 2020
Messages
32
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
  2. Mobile
  3. Web
Need to print the value
  • In column J if it is B then value of column F should be shown in column K
  • In column J if it is S then value of column E should be shown in column K

Print Value.xlsx
ABCDEFGHIJKL
1NoSYMLTPOPNHGHLWPCPDCCHNGB/SVALUEEXEPECTED OP
21CSK30.353032.353030.8-0.45-1.46B30
32CTI187.25190190185.7191.6-4.35-2.27S190
43BBA46.146.747.0545.7547.3-1.2-2.540
Sheet1
Cell Formulas
RangeFormula
J2:J4J2=IF(D2=F2,"B",IF(D2=E2,"S",))
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
=IF(J2="B",F2,IF(J2="S",E2,""))

you may also want to put a value in for J2 does not equal B or S The FALSE condition
=IF(D2=F2,"B",IF(D2=E2,"S",))
a blank for example
=IF(D2=F2,"B",IF(D2=E2,"S",""))
 
Upvote 0
=IF(J2="B",F2,IF(J2="S",E2,""))

you may also want to put a value in for J2 does not equal B or S The FALSE condition
=IF(D2=F2,"B",IF(D2=E2,"S",))
a blank for example
=IF(D2=F2,"B",IF(D2=E2,"S",""))

thanks it works
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,681
Members
449,116
Latest member
HypnoFant

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