Match or nested if or vlookup?

PKBrahma

New Member
Joined
Nov 26, 2017
Messages
28
Sir,
I have my present salary in Col-B and new (fitment range) salary in Col-C. If Col-B matches with any one of the fitment range cells of Col-C, new salary will be the present salary. Else, my new salary will be fit in the next higher cell of the fitment range. I want to show my new Salary in Co-D. How can I do? Should I use nestedif or vlookup or match? Please guide me with code. Thanks & regards.


<colgroup><col style="width:48pt" width="64" span="2"> <col style="mso-width-source:userset;mso-width-alt:2486;width:51pt" width="68"> <col style="mso-width-source:userset;mso-width-alt:2816;width:58pt" width="77"> </colgroup><tbody>
[TD="class: xl69, width: 64"]A[/TD]
[TD="class: xl69, width: 64"]B[/TD]
[TD="class: xl69, width: 68"]C[/TD]
[TD="class: xl69, width: 77"]D[/TD]

[TD="class: xl65"] Names
[/TD]
[TD="class: xl65"] Salary [/TD]
[TD="class: xl66, width: 68"] Fitment Range [/TD]
[TD="class: xl65"] New Salary
[/TD]

[TD="class: xl68"]AAA[/TD]
[TD="class: xl68"]78976[/TD]
[TD="class: xl68"]69700[/TD]
[TD="class: xl67"]
[/TD]

[TD="class: xl68"]BBB[/TD]
[TD="class: xl68"]82626[/TD]
[TD="class: xl68"]71800[/TD]
[TD="class: xl67"] [/TD]

[TD="class: xl68"]CCC[/TD]
[TD="class: xl68"]83114[/TD]
[TD="class: xl68"]74000[/TD]
[TD="class: xl67"] [/TD]

[TD="class: xl68"]DDD[/TD]
[TD="class: xl68"]84759[/TD]
[TD="class: xl68"]76200[/TD]
[TD="class: xl67"] [/TD]

[TD="class: xl68"]EEE[/TD]
[TD="class: xl68"]84964[/TD]
[TD="class: xl68"]78500[/TD]
[TD="class: xl67"] [/TD]

[TD="class: xl68"]FFF[/TD]
[TD="class: xl68"]86789[/TD]
[TD="class: xl68"]80900[/TD]
[TD="class: xl67"] [/TD]

[TD="class: xl68"]GGG[/TD]
[TD="class: xl68"]86789[/TD]
[TD="class: xl68"]83300[/TD]
[TD="class: xl67"] [/TD]

[TD="class: xl68"]HHH[/TD]
[TD="class: xl68"]86789[/TD]
[TD="class: xl68"]85800[/TD]
[TD="class: xl67"] [/TD]

[TD="class: xl68"]III[/TD]
[TD="class: xl68"]86866[/TD]
[TD="class: xl68"]88400[/TD]
[TD="class: xl67"] [/TD]

[TD="class: xl68"]JJJ[/TD]
[TD="class: xl68"]88400[/TD]
[TD="class: xl68"]91100[/TD]
[TD="class: xl67"] [/TD]

[TD="class: xl68"] [/TD]
[TD="class: xl68"] [/TD]
[TD="class: xl68"]93800[/TD]
[TD="class: xl67"] [/TD]

[TD="class: xl68"] [/TD]
[TD="class: xl68"] [/TD]
[TD="class: xl68"]96600[/TD]
[TD="class: xl67"] [/TD]

</tbody>
 
Sir,
I owe you very much. I just couldn't find out the logic and so failed. Till now, I am just copying the codes given by you. Can't I write by myself? Of course, not. Because, I've been teaching English literature for 34 years now. I am not an expert in Excel. Anyway, you are inspiring me to write by myself. Me be blessed. Thanks and regards. Bye.
 
Upvote 0

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Sir,
Even if the value of a cell in Col-B matches the value of a cell in col-D, then also the value should change to next value. In that case, what to change and where? Please advise. Thanks.

You can also use this:

Code:
=IF(B2="","",INDEX($C$2:$C$13,MATCH(B2,$C$2:$C$13,1)+1))
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

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