Generating leadsheets

shakethingsup

Board Regular
Joined
May 21, 2017
Messages
64
Office Version
  1. 365
Platform
  1. Windows
I have a workbook in which I will have multiple tabs.

Tab 1 looks like this. Let's call this Tab - ALL. The common thread is the group name:

zwgjPop.png


I will create a second tab called "cash" and have a A1 also be called "cash"

I want to then prepopulate this second tab with all accounts, descriptions and amounts that match "cash"

I will then do that for AR, Prepaid and so forth.

My current solution in the cash tab:
=IF($A$1='All'!$A1,'All'!B2)

This pulls in 1110. I just copy the formula into the next cell and so forth and it pulls in the description and amount. I can drag it down. When it doesn't find a match, it outputs FALSE and I know to stop.

Any other way to do this?

Thank you
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
You could filter and copy, either manually or using vba/vbScript. But I am not so sure the formula you posted is the best for the job. I think I would use something like
Code:
=IF($A$1='All'!$A2,'All'!B2)
to get the corresponding account for each matching transaction type.
 
Upvote 0
Try this Vba script:

Code:
Sub Copy_From_All()
Application.ScreenUpdating = False
Dim i As Long
Sheets("All").Activate
Dim Lastrow As Long
Lastrow = Cells(Rows.Count, "A").End(xlUp).Row
    For i = 2 To Lastrow
        Rows(i).Copy Sheets(Cells(i, 1).Value).Rows(Sheets(Cells(i, 1).Value).Cells(Rows.Count, "A").End(xlUp).Row + 1)
     Next
Application.ScreenUpdating = True
End Sub
 
Upvote 0
If I only knew how to code in VBA, use VBA.

Which leads me to another question.

Any virtual classrooms or resources for people to learn VBA for beginners? Basically online school for this?
 
Upvote 0
If I only knew how to code in VBA, use VBA.

Which leads me to another question.

Any virtual classrooms or resources for people to learn VBA for beginners? Basically online school for this?

There are numerous tutorials on the web. Just type 'Free VBA Tutorial' in your web search box and click 'Go'. It will bring up several options. You can also learn by reviewing postings on this site.
 
Upvote 0
My answer is this, I'm saying I don't know how to run it yet. I will learn over the next week :)
 
Upvote 0

Forum statistics

Threads
1,224,819
Messages
6,181,153
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top