Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA REQUIRED TO TAKE VALUE FROM EACH CELL FROM A RANGE AND FIND THE VALUE FROM A DIFFERENT RANGE
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA REQUIRED TO TAKE VALUE FROM EACH CELL FROM A RANGE AND FIND THE VALUE FROM A DIFFERENT RANGE
Dear Captain -
just a side note - can you please not SHOUT your headers? :) thanks susan |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find Last cell in Range when range is date format | Excel Discussion (Misc queries) | |||
Find the POSITION IN A RANGE of text in a string that matches value(s) in a range | Excel Programming | |||
Find first cell in range and expand range -VBA | Excel Programming | |||
Set range based on cell contents - help required | Excel Programming | |||
Range.Find returns cell outside of range when range set to single cell | Excel Programming |