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: 30
Default Help with VBA syntax

Hi I posted this message yesterday and would really
appreciate some help.

I would like to add the values from a lookup table as
shown below, to the row beneath my 'fields' (based on an
extract file) on worksheet 1 of my spreadsheet where there
is a match in description. The table looks like this and
is held on a separate worksheet called "table".

Column A Column B

GWP 1
Earned 2
RI Result CY 6
RI Result PY 7
Claims CY 4
Claims PY 5
Expenses 3
Tax
Investments
Result 8

The fields on my worksheet are output across columns and
are organised in the same order as column A above so that
GWP, Earned, RI Result CY, RI Result PY, Claims CY etc.
However in an empty row beneath these fields I'd like to
somehow insert the values shown by Column B where it finds
a match.
This is so I can run mulitple reports from
the same file and effectively resort the fields to
achieve a different layout.
Note, Column B of the table does not include a field
number for each item because these will be dropped from
the report.
What VBA syntax would I use to do this. Do I need to
create an array and use the Redim Preserve. Is it a Do
Loop type routine. I'd really appreciate some help.

Would I read through all the values in the table first and
then step through each field on worksheet 1? Or would it
be done on a individual basis. How do I then pick up the
values in Column B?
Can anyone provide a brief example?
Many thanks
Jacqui



 
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
right syntax pls123 Excel Worksheet Functions 8 May 6th 10 05:18 AM
vba syntax Derrick Excel Discussion (Misc queries) 11 August 5th 09 08:37 PM
SQL syntax Spike Excel Worksheet Functions 2 March 8th 07 08:27 AM
Syntax Help Dmorri254 Excel Worksheet Functions 2 March 2nd 05 02:51 PM
syntax Don[_13_] Excel Programming 2 November 16th 03 03:30 AM


All times are GMT +1. The time now is 09:41 PM.

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

About Us

"It's about Microsoft Excel"