Extract data from table from single date search

Visy123

New Member
Joined
Jul 13, 2018
Messages
11
Hi All
Just a newbie searching for help. I have a table that is populated via a userform and would like to enter a date on a different sheet and it would return 3 columns of values associated with that date. The date would appear numerous times in the table. As per below. I would like to extract Client Name, Ad Height, Ad Column, Issue Date (search date), and section. I cant find a fuction or combination that seems to work , at least with my limited knowledge. Any advice would be greatly appreciated:confused:

Client NameContact NameContact PhoneAd Size HeightAd Size ColumnCost per IssueIssue DateRep NameSection
ABC Carpet CleaningJohn63620545107125.0029/07/2018RayEGN
Hair ShopMary6362987810255.0029/07/2018MargEGN
Mechanics PlusMario6362451212366.009/01/2018margMotors
Bos RestaurantPhebe418524458157225.002/01/2018RayEats
mazda CarsJohn415125785203450.009/01/2018RayMotor

<colgroup><col><col span="2"><col><col><col><col><col span="2"></colgroup><tbody>
</tbody>

<colgroup><col><col span="2"><col><col><col><col><col span="2"></colgroup><tbody>
</tbody>

<colgroup><col><col span="2"><col><col><col><col><col span="2"></colgroup><tbody>
</tbody>
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Welcome to the MrExcel board!

1. You mention that the date could appear numerous times. Do you want the data from those numerous rows all returned on the other sheet? If not all, which one(s) should be returned?

2. Your description says you want to return 3 columns of values, but then you list 5 column headings. Please clarify.

Edit: One further question
3. For this result are you looking for a macro or formula solution?
 
Last edited:
Upvote 0
Hello Visy123,

Ditto Peter's item (2). However, try the following code placed in a standard module and assigned to a button:-

Code:
Sub FindData()

         Dim Srch As String: Srch = Sheet2.[A1].Value
         
Application.ScreenUpdating = False

With Sheet1.[A1].CurrentRegion
        .AutoFilter 7, Srch
        Union(.Columns("A"), .Columns("D:E"), .Columns("G"), .Columns("I")).Offset(1).Copy
        Sheet2.Range("A" & Rows.Count).End(3)(2).PasteSpecial xlValues
        .AutoFilter
End With

Sheet2.[A1].Value = "SEARCH"

Application.CutCopyMode = False
Application.ScreenUpdating = True

End Sub

The code assumes:

- Sheet1 data starts in row2 with headings in row1.
- Cell A1 in sheet2 is the search cell in which a date is entered.

I hope that this helps,

Cheerio,
vcoolio.
 
Upvote 0
Welcome to the MrExcel board!

1. You mention that the date could appear numerous times. Do you want the data from those numerous rows all returned on the other sheet? If not all, which one(s) should be returned?

2. Your description says you want to return 3 columns of values, but then you list 5 column headings. Please clarify.

Edit: One further question
3. For this result are you looking for a macro or formula solution?


Thank you both

Sorry I wasnt very clear. If I can explain a little better This is a booking sheet for a magazine where clients book an advertisement on a published day, so for this magazine it comes out every Thursday If you have 50 clients they can book for any given issue. For the magazine to do the layout ie where ads will fall in the Mag. a dummy layout is produced with basic information being "Client Name", "Ad Size Height", "Ad Size Column" and "Section" aalong with the search date being the "issue date" If I could use a formula to extract this information as Im even worse with VBA

Thank You Again and Hope I havent waffled on to much
 
Upvote 0
See if this is any help.

Excel Workbook
ABCDEFGHI
1Client NameContact NameContact PhoneAd Size HeightAd Size ColumnCost per IssueIssue DateRep NameSection
2ABC Carpet CleaningJohn6362054510712529/07/2018RayEGN
3Hair ShopMary636298781025529/07/2018MargEGN
4Mechanics PlusMario63624512123669/01/2018margMotors
5Bos RestaurantPhebe4185244581572252/01/2018RayEats
6mazda CarsJohn4151257852034509/01/2018RayMotor
7
Sheet1



In Sheet2,
- Insert a new row 1 and a new column A
- Formula in C1 is copied across
- Formula in A3 is copied down as far as you might ever need.
- Enter the date of interest in B3
- Formula in C3 is copied across and down the same distance as column A
- Row 1 and column A can now be hidden if you want
- Change the date of interest in B3 and the other data should update to reflect the new value.

Excel Workbook
ABCDEF
11459
2IndexIssue DateClient NameAd Size HeightAd Size ColumnSection
339/01/2018Mechanics Plus123Motors
45mazda Cars203Motor
5
Sheet2
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,693
Members
448,979
Latest member
DET4492

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