values in macros

ariel_jaan

New Member
Joined
Aug 26, 2007
Messages
15
good day sir! i thank you deeply for the help. Can i ask you again? Here it goes:

I have 2 sheets - sheet1(induct) sheet2(gs&hs)
In sheet 1 are the following
A B
Excess Allowance
Years
1 1,500.00
2 1,425.00
3 1,325.00
4 1,250.00
5 1,200.00
6 800.00

In sheet2 here it goes
A B C
Name Years Allowance ---> here i added a command button

Jo 2.6
Dy .49
Lim 5.1
Tiu 1.2
Rey 3.3

What i want to have is when i push the command button the macro will place the allowances in column C in sheet2.

Basis will be from
1 to 1.99 = 1500
2 to 2.99 = 1,425.00
3 to 3.99 = 1,325.00
4 to 4.99 = 1,250.00
5 to 5.99 = 1,200.00
6 to 6.99 = 800.00

From sheet two you see that there are different values in column B or the no. of years.

I hope you could help me sir.

Thank you very much
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
You don't need a macro for that; a simple VLOOKUP will do.

Say your table on Sheet1 goes from A2:B7. In C3 of Sheet2 you could use

=VLOOKUP(A3,Sheet1!$A$2:$B$7,2)

Denis
 
Upvote 0

Forum statistics

Threads
1,225,354
Messages
6,184,460
Members
453,235
Latest member
dirtisbrown17

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