Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
BG BG is offline
external usenet poster
 
Posts: 31
Default Indirect? or Match? ??

I have a project I need to get out tomorrow and have a couple of steps to go
but similar in nature.

I tried to post earlier but it didn't post for some reason?

I have 6 tabs
Tab 1 - Data Entry
Tab 2,3,4,5 - have tables that are created (medical claims, rx claims,
vision claims etc...)
Tab 6 - Summary of all combined

I need to look at Tab 1 and take the value they choose in Cell A12 and match
that name with a tab and copy the table from I7:N20 and put it into the Tab 6
below a bunch of other summary data

for example:
Tab 1 Cell A12 = Medical
So I want it to go to Tab 2, the name of the tab is Medical Claims so it
would choose the table in I7:N20 and copy and place into the Summary tab

How do I do this automatically .. with my other summary data. ?? Is this an
indirect function or?? thank you all in advance!!!!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Indirect? or Match? ??

You can try out the below macro. If you are new to macros..

--Set the Security level to low/medium in (Tools|Macro|Security).
--From workbook launch VBE using short-key Alt+F11.
--From menu 'Insert' a module and paste the below code.
--Get back to Workbook.
--Run macro from Tools|Macro|Run <selected macro()

Few points to be noted
--Tab names are cell A12 and ** a ** space followed by 'claims' example :'
Medical claims'
--You havent mentioned the destination cell; which is assumed as Column A
next available free cell..Adjust to suit. Try and feedback

Sub CopyMacro()
Dim lngNextRow As Long
Dim ws1 As Worksheet, ws2 As Worksheet

Set ws1 = Worksheets("Data Entry")
Set ws2 = Worksheets(CStr(Trim(ws1.Range("A12")) & " claims"))

lngNextRow = ws2.Cells(Rows.Count, "A").End(xlUp).Row
ws1.Range("I7:N20").Copy ws2.Range("A" & lngNextRow)
End Sub


If this post helps click Yes
---------------
Jacob Skaria


"bg" wrote:

I have a project I need to get out tomorrow and have a couple of steps to go
but similar in nature.

I tried to post earlier but it didn't post for some reason?

I have 6 tabs
Tab 1 - Data Entry
Tab 2,3,4,5 - have tables that are created (medical claims, rx claims,
vision claims etc...)
Tab 6 - Summary of all combined

I need to look at Tab 1 and take the value they choose in Cell A12 and match
that name with a tab and copy the table from I7:N20 and put it into the Tab 6
below a bunch of other summary data

for example:
Tab 1 Cell A12 = Medical
So I want it to go to Tab 2, the name of the tab is Medical Claims so it
would choose the table in I7:N20 and copy and place into the Summary tab

How do I do this automatically .. with my other summary data. ?? Is this an
indirect function or?? thank you all in advance!!!!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
BG BG is offline
external usenet poster
 
Posts: 31
Default Indirect? or Match? ??

thank you Jacob : I'm very new to this and a little confused?
I have some code written for the prior data in the Summary tab and was
guessing I add .Offset(2,0).FormulaR1C1 = ????? But I wasn't sure what that
part says

in the example you helped me with below could you help me understand how it
knows to go to the Medical Claims tab vs the other 3 and then I'm not sure
how it get's pasted into the Summary tab (I was guessing, but truly this is
only a guess that it somehow goes into the offset?

-- Brad

"Jacob Skaria" wrote:

You can try out the below macro. If you are new to macros..

--Set the Security level to low/medium in (Tools|Macro|Security).
--From workbook launch VBE using short-key Alt+F11.
--From menu 'Insert' a module and paste the below code.
--Get back to Workbook.
--Run macro from Tools|Macro|Run <selected macro()

Few points to be noted
--Tab names are cell A12 and ** a ** space followed by 'claims' example :'
Medical claims'
--You havent mentioned the destination cell; which is assumed as Column A
next available free cell..Adjust to suit. Try and feedback

Sub CopyMacro()
Dim lngNextRow As Long
Dim ws1 As Worksheet, ws2 As Worksheet

Set ws1 = Worksheets("Data Entry")
Set ws2 = Worksheets(CStr(Trim(ws1.Range("A12")) & " claims"))

lngNextRow = ws2.Cells(Rows.Count, "A").End(xlUp).Row
ws1.Range("I7:N20").Copy ws2.Range("A" & lngNextRow)
End Sub


If this post helps click Yes
---------------
Jacob Skaria


"bg" wrote:

I have a project I need to get out tomorrow and have a couple of steps to go
but similar in nature.

I tried to post earlier but it didn't post for some reason?

I have 6 tabs
Tab 1 - Data Entry
Tab 2,3,4,5 - have tables that are created (medical claims, rx claims,
vision claims etc...)
Tab 6 - Summary of all combined

I need to look at Tab 1 and take the value they choose in Cell A12 and match
that name with a tab and copy the table from I7:N20 and put it into the Tab 6
below a bunch of other summary data

for example:
Tab 1 Cell A12 = Medical
So I want it to go to Tab 2, the name of the tab is Medical Claims so it
would choose the table in I7:N20 and copy and place into the Summary tab

How do I do this automatically .. with my other summary data. ?? Is this an
indirect function or?? thank you all in advance!!!!

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Indirect? or Match? ??

Here we are using the worksheet object..

The below line will assign ws2 as a worksheet object named as
ws1.Range("A12") & " claims"

Set ws2 = Worksheets(CStr(Trim(ws1.Range("A12")) & " claims"))


If this post helps click Yes
---------------
Jacob Skaria


"bg" wrote:

thank you Jacob : I'm very new to this and a little confused?
I have some code written for the prior data in the Summary tab and was
guessing I add .Offset(2,0).FormulaR1C1 = ????? But I wasn't sure what that
part says

in the example you helped me with below could you help me understand how it
knows to go to the Medical Claims tab vs the other 3 and then I'm not sure
how it get's pasted into the Summary tab (I was guessing, but truly this is
only a guess that it somehow goes into the offset?

-- Brad

"Jacob Skaria" wrote:

You can try out the below macro. If you are new to macros..

--Set the Security level to low/medium in (Tools|Macro|Security).
--From workbook launch VBE using short-key Alt+F11.
--From menu 'Insert' a module and paste the below code.
--Get back to Workbook.
--Run macro from Tools|Macro|Run <selected macro()

Few points to be noted
--Tab names are cell A12 and ** a ** space followed by 'claims' example :'
Medical claims'
--You havent mentioned the destination cell; which is assumed as Column A
next available free cell..Adjust to suit. Try and feedback

Sub CopyMacro()
Dim lngNextRow As Long
Dim ws1 As Worksheet, ws2 As Worksheet

Set ws1 = Worksheets("Data Entry")
Set ws2 = Worksheets(CStr(Trim(ws1.Range("A12")) & " claims"))

lngNextRow = ws2.Cells(Rows.Count, "A").End(xlUp).Row
ws1.Range("I7:N20").Copy ws2.Range("A" & lngNextRow)
End Sub


If this post helps click Yes
---------------
Jacob Skaria


"bg" wrote:

I have a project I need to get out tomorrow and have a couple of steps to go
but similar in nature.

I tried to post earlier but it didn't post for some reason?

I have 6 tabs
Tab 1 - Data Entry
Tab 2,3,4,5 - have tables that are created (medical claims, rx claims,
vision claims etc...)
Tab 6 - Summary of all combined

I need to look at Tab 1 and take the value they choose in Cell A12 and match
that name with a tab and copy the table from I7:N20 and put it into the Tab 6
below a bunch of other summary data

for example:
Tab 1 Cell A12 = Medical
So I want it to go to Tab 2, the name of the tab is Medical Claims so it
would choose the table in I7:N20 and copy and place into the Summary tab

How do I do this automatically .. with my other summary data. ?? Is this an
indirect function or?? thank you all in advance!!!!

Reply
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
Using Indirect with an Index Match Function Mike[_16_] Excel Worksheet Functions 3 April 17th 09 04:08 PM
Indirect with index and match Kashyap Excel Worksheet Functions 2 March 18th 09 04:24 AM
Indirect & Match Formula Problem jkim Excel Discussion (Misc queries) 3 February 15th 09 09:46 PM
Match, Index, Indirect ? PCLIVE Excel Worksheet Functions 1 April 6th 07 05:02 PM
Index,Indirect, and Match caldog Excel Worksheet Functions 3 November 10th 06 11:57 PM


All times are GMT +1. The time now is 03:43 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"