View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
[email protected] meh2030@gmail.com is offline
external usenet poster
 
Posts: 135
Default VBA REQUIRED TO TAKE VALUE FROM EACH CELL FROM A RANGE AND FIND THE VALUE FROM A DIFFERENT RANGE

On Jul 5, 2:50 pm, CAPTGNVR wrote:
DEAR ALL
In col.A have the needed tank numbers and groups. (2c, 5c, 3c say in
three cells and below 3c will be the group name 'fuel oil' in a4 and
so on for four or five group of tanks.

In col. D I have the tanks listed in order say about 20 tanks and in
col E, I have respective tank quantities.

What is needed is VBA code to take each cell value range in col. A
(range a1. a10) and check in range col.D (range d1.d20) and take the
value mentioned in col.E and place it in col.B.

I could do this but where I am finding difficulty is the minute the
cell value is a gropu name like "fuel oil" then i get error in find-
what.

So pls advice how to program so that if the match is not found to go
to the next cell of col.A and find for the value in col.D and take the
corresponding value from col.E and place it in col.B


It's not very clear as to what you are looking to do (or at least I'm
having trouble following). You might want to post some of the code
that you have already. Also, lookup the VLOOKUP Function in the Excel
Help. This may give you what you are looking for.

Matt