LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 557
Default PLEASE HELP - MACRO NEEDED

I have data in sheet 1 (see below)
ROW A B C ------col (sheet 1)
1 CODE VALUE CODE_2
2 SS 10 GGG
3 TT 20 SSS
4 VV 30 TTT
5 ZZ 40 GGG
6 XX 50 GGG
7 RR 60 TTT
8 HH 70 TTT
9 JJ 80 GGG
10 KK 90 SSS
11 PP 100 TTT

in sheet 2 I have table and in cell B1 , C1 and D1 I have same Codes
as headings which are used in column C of sheet 1 (see below)

ROW A B C D----col (sheet 2)
1 CODE GGG SSS TTT
2 TT
3 SS
4 KK
5 PP

I want macro to check that if "GGG" which is in cell B1 of sheet 2 and
"TT" which is in cell A2 of sheet 2 come in same row in range "A2:C11"
of sheet 1 then get the value from column B of sheet 1 of that row and
put in cell B2 of sheet 2. And do same with other codes which are
"SS , KK , PP" in column A of sheet 2 and again same prossess with
codes "SSS and TTT". Basically i want macro to check 3 digit codes in
row 1 of column B to C and 2 digit codes from column A of sheet 2 into
sheet 3 and when 3 digit code and 2 digit code come in same row in col
A and C of sheet 3 then pick value form col B of that row and put in
sheet 2 against the codes.

macro should produce the result something like this (see below)

ROW A B C D----col (sheet 2)
1 CODE GGG SSS TTT
2 TT 0 20 0
3 SS 10 0 0
4 KK 0 90 0
5 PP 0 0 100
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro needed please jackrobyn1 Excel Discussion (Misc queries) 3 June 6th 08 08:41 PM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
Macro needed to set macro security in Excel to minimum Carl Excel Programming 3 March 18th 06 03:36 PM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 1 June 11th 05 12:44 AM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 0 June 10th 05 03:38 PM


All times are GMT +1. The time now is 12:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"