need if conditions

sakthi775

New Member
Joined
Oct 7, 2019
Messages
2
my data is

Pos0 Subs1 subs2 subSub
1 12
2 113
3 125

<colgroup><col><col><col><col><col></colgroup><tbody>
</tbody>

1 subs- 1 pos and 2 sub then in 1 subs ZERO and in 2 sub its 1
1 subs-1 pos and 1 sub then in 1 subs 1 and 0 subs its 1
2 subs-2 pos and 2 sub then in 1 subs 2
2 subs -2 pos and 3 sub then in 1 subs 1 and two sub 1
3 subs - 3 pos and 3 sub then in 1 subs 3
3 subs - 3 pos and 4 sub then in 1 subs 2 and two sub 1
3 subs - 3 pos and 5 sub then in 1 subs 1 and two sub 2
3 subs - 3 pos and 6 sub then in 1 subs its 3
more than 3 subs - 2 pos with more than 4 subs its 2 sub in 2 sub

Basically i need a if condition to get 1 sub and 2 sub based on pos value

2 pos means actual 4 subs need to be there if so 2 subs will be 2
2 pos with only 3 subs then 1 subs will have 1 and on in 1 subs
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Pos0 Subs1 subs2 subSub
3=IF((D3-H3)<0,"0",D3-H3)=IF(H3=D3,H3,IF(H3<=D3,D3-H3))=IF(D3*2=H3,H3,IF(D3*2<h3,h3-d3,if(d3<=h3,"0",if(h3>(D3*2),D3))))</h3,h3-d3,if(d3<=h3,"0",if(h3>2
4=IF((D4-H4)<0,"0",D4-H4)=IF(H4=D4,H4,IF(H4<=D4,D4-H4))=IF(D4*2=H4,H4,IF(D4*2<h4,h4-d4,if(d4<=h4,"0",if(h4>(D4*2),D4))))</h4,h4-d4,if(d4<=h4,"0",if(h4>3
5=IF((D5-H5)<0,"0",D5-H5)=IF(H5=D5,H5,IF(H5<=D5,D5-H5,"0"))=IF(D5*2=H5,H5,IF(D5*2<h5,h5-d5,if(d5<=h5,"0",if(h5>(D5*2),D5))))</h5,h5-d5,if(d5<=h5,"0",if(h5>7

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,213,520
Messages
6,114,099
Members
448,548
Latest member
harryls

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