Hi Everyone,
I want to know the macro that list data to a "Report" worksheet from "DATATABLE" worksheet with my specified date.
I planned to used a command button to run the macro.
Attached is the sample worksheet.
Thanks thanks..
Hi Everyone,
I want to know the macro that list data to a "Report" worksheet from "DATATABLE" worksheet with my specified date.
I planned to used a command button to run the macro.
Attached is the sample worksheet.
Thanks thanks..
So if the Schedule Dates on DATATABLE Worksheet, match B3 Cell of Report worksheet, you want to get the whole row?
Cheers!
Deep Dave
anyone have some ideas about this?
Why do you need VBA and an button for this? You could use the ARRAY formula below to pull the data automatically...
B6=IFERROR(INDEX(DATATABLE!A:A,SMALL(IF(DATATABLE!$F$2:$F$5=REPORT!$B$3,ROW(DATATABLE!$A$2:$A$5)),ROWS($A$1:A1))),"")
...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
Then copy down and across
(note, the use of NOW() included the current time ad well as the date, so nothing will match exactly between B3 and column F. I changed B3 to 1 of your dates in column F to test...
A B C D E F 3Date : 02-May-16<<-- Please verify if it is the exact date as of today… 4 5 Last Name First Name MI ATM# PIN# 6Sample1 Sample1 S2 With Meeting 0.375 7Sample2 Sample2 S2 With Meeting 0.666666667 8
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
Hello Chergian,
If you would still prefer a macro, then the following code may help:-
Assign the code to the button in the Report sheet.Please Login or Register to view this content.
The code basically checks that the dates in Column F of the DataTable sheet are dates and if a date matches the date in cell B3 in the Report sheet, then the relevant row of data from the DataTable sheet will be transferred to the Report sheet.
The Report sheet is refreshed with each transfer so that there will not be any duplicates and you can keep all data in the DataTable sheet.
Ensure that all dates are formatted the same in both sheets.
I've attached my test work book for you to peruse at the following link (this site's file uploader does not appear to work for me):-
https://www.dropbox.com/s/g3hido62x7...gian.xlsm?dl=0
In the Report sheet, you will see that I have changed the formula in B3 to
I hope that this helps.Please Login or Register to view this content.
Cheerio,
vcoolio.
Last edited by vcoolio; 05-01-2016 at 05:47 AM. Reason: Typo
Thank you so much!!! it works!
Good day FD,
Being a simpler option, I would say that the OP has used your formula.
Just an aside, FD:-
The site's file uploader has not worked for months on my end. I've tried it on three different browsers with no luck. All my settings are fine. I've sent a message or two to Admin over the last few months but no reply. Would you be able to enlighten me or pass the query on? Thanks FD.
Cheerio,
vcoolio.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks