VBA lookup range in another worksheet

tspaja

New Member
Joined
Jul 8, 2019
Messages
1
Hi,
I`m a beginner to VBA and have the following requirement.Please provide your inputs
There are 2 worksheets, “Table” and “Object Size”
Worksheet “Table” has 2 tables in turn as follows;
Table1
Table Name
Size
COEP
100
COST
0
<tbody> </tbody>

Table2
Object Name
COEP
COST
CO_ITEM
83.6
0
CO_ORDER
10.2
0
SD_VBRK
5.8
0
MM_EBAN
0.4

<tbody> </tbody>

Worksheet “Object Size” has 1 table
ObjectSizeTable
Object Name
Size
FI_DOC
134.7
CO_ITEM
116
MM_EBAN
86
<tbody> </tbody>

The requirement is as below:
If Table name in “Table1” is not equal to “Zero”, then itshould lookup for associated “Object Name” (listed in table 2 – the number ofobjects is not constant) in Table “ObjectSizeTable” of worksheet “Object Size”and then update the size in column 2 accordingly;
Say, new CO_ITEM size in ObjectSizeTable = 116 – (100-83.6) –This can be updated in the same cell or can be generated in a new cell of thesame worksheet.

Thanks,
Pankaj


 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Forum statistics

Threads
1,213,491
Messages
6,113,963
Members
448,536
Latest member
CantExcel123

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