VBA to pull data dynamically from multiple sheets

Tahas

Board Regular
Joined
Sep 10, 2008
Messages
166
Hello All,
I have a created a spreadsheet for our sales team. There are five sales staff and I have assigned each with one tab so they can update their sales data which occurs several times a day. I want excel to dynamically pull data from each tab and when it goes to last row for a particular tab (say sheet1), then it moves to the next tab (sheet2) and so on. I used following formula to pull data but do not know how to instruct excel to look for the last row and move to next sheet. Here is my formula that I used but I think a VBA would be a better option:
=HLOOKUP(B$1,INDIRECT("Ivy"&"!A1:BT500"),ROWS(B$1:B1)+1,FALSE)

Any help will be highly appreciated!
Taha
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Let me paraphrase:
You want to pull all rows from each of the 5 Sales tab,
and consolidate then into another tab?

Question:
What would you wish to do with each of the 5 Sales data after you pulled them into a consolidated sheet?
Leave them there, or delete them?

Why?
If you leave them there, you will need to know which data has already been consolidated previously,
so that you just pull new data.
 
Upvote 0
Hello Larry,
I don't want to delete the tabs as all five tabs are constantly being updated by the sales staff. I will create a macro to auto refresh the "Consolidated Sheet" in real-time as sales staff update the data.
 
Upvote 0
I do not mean delete the tabs, but delete the data in those tabs.
 
Upvote 0
alansidman

Thanks so much alansidman. I used Power Query and it worked like a charm. You gave me a better insight and now I am going to use Power BI to pull data directly and create interactive visualization dashboard. You are amazing!
 
Upvote 0

Forum statistics

Threads
1,214,780
Messages
6,121,522
Members
449,037
Latest member
tmmotairi

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