Macro to find the value of adjacent cell from a range of values

M

maniarasan

Hi,

I am in need of a macro program to find the value of adjacent cell
that is given as input

Consider

Cells
A3 No of Trucks B3 Factor
0 1.1
1 1.3
2 1.55
3 1.6
4 1.8
5 1.96
6 2.1
7 2.25
A12 8 2.4

If Cell A1="No of Trucks" is given a value as 4, macro need to search
the range of value and write the adjacent cell value 1.8 in cell
B1="Factor".
Macro should include the search for value 0 to 8.
 
J

Javed

Hi,

I am in need of a macro program to find the value of adjacent cell
that is given as input

Consider

  Cells
A3  No of Trucks B3 Factor
          0                     1.1
          1                     1.3
          2                     1.55
          3                     1.6
          4                     1.8
          5                     1.96
          6                     2.1
          7                     2.25
A12    8                     2.4

If Cell A1="No of Trucks" is given a value as 4, macro need to search
the range of value and write the adjacent cell value 1.8 in cell
B1="Factor".
Macro should include the search for value 0 to 8.

Probably VLOOKUP function can do it much easily.

in cell B1 paste the formula
=VLOOKUP(A1,$A$3:$B$12,2,0)

You have to change $A$3:$B$12 to actual table address
 
M

maniarasan

Probably VLOOKUP function can do it much easily.

in cell B1 paste the formula
=VLOOKUP(A1,$A$3:$B$12,2,0)

You have to change $A$3:$B$12 to actual table address- Hide quoted text -

- Show quoted text -

Hi,

Can anyone help me with the macro program for above...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top