LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Help with VBA syntax

of course - I'm emailing a direct address for you

-----Original Message-----


Dear Patrick

Thank you for your reply. The example I'd given was a

really simplified
version of the actual data and I knew it probably

wouldn't lend itself
to a written explanation. Sorry if it didn't make sense.
Am I able to send you a file with a small XL example if

not then I've
attempted to explain again. Pls note I do not wish to

use filters or
pivot tables etc

Worksheet 1 contains data organised across columns

rather like fields in
a database. The captions/headers of this row are

A B C

D E
F G H
GWP UPR Earned RI CY RI

PY Claims CY
Claims PY Expenses

and so on across 95 columns.

Now what I'd like to do is reorganise those columns in a

different order
according to the report type, ie whether it's a UKGAAP

report , a FR
GAAP report but give the user control via a front-end

table rather than
hard-coding anything. Hence on worksheet 2 (called

table) I've created
the following

Column A Column B Column C
Desc Report1 Report2
GWP 1
UPR
Earned 3 1
RI CY 6
RI PY 7
Claims CY 4 2
Claims PY 5 3

and so on. The idea is that the number denotes the

field reference
number. In actual fact in Columns C, D there will be

other definitions
to create a number of reports from the same extract file.

What I'd like the VBA to do is step through column A of

the table for
each item with an entry in column B (don't worry about

column C 'cause I
know how to refer to that). VBA then needs to remember

the description
and related number so that where a match is found

against the original
data (on worksheet 1), the detail is transferred so that

A B C

D E
F G H
GWP UPR Earned RI CY RI

PY Claims CY
Claims PY Expenses
1 3

6 7
4 5

I can then use this row as a basis for resorting my

columns, using VBA.

I'm ok with the code to hide/delete unwanted columns but

thank you for
your example. Please note I cannot organise my source

data in the
correct order to just run the routine by hiding/deleting

columns (that
was my original plan) it's a no go because of the

differing report
layouts we use. Just trust me on that one.

I hope this makes a little more sense. Any more help

would be greatly
appreciated.
Kind regards

Jacqui

*** Sent via Developersdex http://www.developersdex.com

***
Don't just participate in USENET...get rewarded for it!
.

 
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 02:57 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"