View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tor Tveitane Tor Tveitane is offline
external usenet poster
 
Posts: 3
Default Point of departure...

Hi,

I'm a newbie to Excel macros. If someone has a few minutes to show me how
to achieve the following I would have a nice point of departure. I have a
workbook with a few sheets. Thanks *a bunch* if there is a kind soul.

Sheet1 looks like this
101 Gas
104 Water
105 Tar
106 Paint

Sheet2 looks like
101 23
104 0.5
106 89

Sheet3 looks like
104 0.7
105 34

What I need the macro to do:
I click somewhere on Sheet1's Col3 to make it the column of the active cell.
An inputbox should pop up and ask me for a sheet name. I enter Sheet3 as
the name and click OK
The macro walks through Sheet3's Col1 numbers, finds the corresponding
number in Sheet1's Col1 and copies Sheet3's Col2 into the correct row in
Sheet1's active column (which had the active cell when starting the macro).
Result after having run the macro:

Sheet1 becomes like this
101 Gas
104 Water 0.7
105 Tar 34
106 Paint

Resulting Sheet1 after having run the macro from Sheet1's Col4 and entered
Sheet2 in the inputbox:
101 Gas 23
104 Water 0.7 0.5
105 Tar 34
106 Paint 89

regards

Tor