Transferring data based on specific date

%3CLINGO-SUB%20id%3D%22lingo-sub-2138197%22%20slang%3D%22en-US%22%3ETransferring%20data%20based%20on%20specific%20date%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2138197%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20am%20creating%20a%20data%20base%2C%20but%20I%20am%20stuck%20at%20point%20where%20I%20want%20data%20to%20be%20copied%20to%20another%20sheet%20based%20on%20date.%20e.g.%20if%20I%20enter%20a%20data%20on%2002%2F12%2F2021%20then%20in%20the%20database%20sheet%20it%20should%20find%20the%20date%2002%2F12%2F2021%20and%20then%20paste%20all%20the%20details%20in%20that%20specific%20column.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2138197%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2138299%22%20slang%3D%22en-US%22%3ERe%3A%20Transferring%20data%20based%20on%20specific%20date%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2138299%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F967800%22%20target%3D%22_blank%22%3E%40KashifRiyadh%3C%2FA%3E%26nbsp%3BWithout%20seeing%20the%20file%20you%20are%20working%20on%2C%20I%20suggest%20you%20look%20into%20one%20of%20Excels%20lookup%20functions.%20LOOKUP%2C%20VLOOKUP%2C%20INDEX%2FMATCH%20or%20XLOOKUP.%20Which%20one%20to%20choose%20depends%20on%20the%20structure%20of%20the%20data%20and%20the%20Excel%20version%20you%20have.%20You%20might%20even%20have%20access%20to%20the%20new%20FILTER%20function.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2138315%22%20slang%3D%22en-US%22%3ERe%3A%20Transferring%20data%20based%20on%20specific%20date%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2138315%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%26nbsp%3Bthank%20you%20for%20your%20reply.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EKindly%20find%20attached%20my%20sample%20file.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ebest%20regards%2C%3C%2FP%3E%3CP%3EKashif%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2138378%22%20slang%3D%22en-US%22%3ERe%3A%20Transferring%20data%20based%20on%20specific%20date%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2138378%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F967800%22%20target%3D%22_blank%22%3E%40KashifRiyadh%3C%2FA%3E%26nbsp%3BI%20chose%20INDEX%2FMATCH.%20See%20column%20D%20on%20the%20Entry%20Sheet.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi,

I am creating a data base, but I am stuck at point where I want data to be copied to another sheet based on date. e.g. if I enter a data on 02/12/2021 then in the database sheet it should find the date 02/12/2021 and then paste all the details in that specific column. 

8 Replies

@KashifRiyadh Without seeing the file you are working on, I suggest you look into one of Excels lookup functions. LOOKUP, VLOOKUP, INDEX/MATCH or XLOOKUP. Which one to choose depends on the structure of the data and the Excel version you have. You might even have access to the new FILTER function.

@Riny_van_Eekelen thank you for your reply.

 

Kindly find attached my sample file.

 

best regards,

Kashif

@KashifRiyadh I chose INDEX/MATCH. See column D on the Entry Sheet.

@KashifRiyadh 

If the database were a database table rather than a worksheet name some of the referencing would be more descriptive.  There is a 'gotcha' with using dates as field names though, in that they get converted to text.  So, following up on @Riny_van_Eekelen 's suggestions in the Excel 365 context

image.pngimage.png

XLOOKUP is more concise but INDEX/XMATCH/XMATCH has the advantage of being able to return multiple columns as an array.

@Peter Bartholomew @Riny_van_Eekelen 

Guys first of all thank you and sorry for late reply.

 

I have attached the sheet again, kindly look into it. 

 

Regards,

Kashif

@KashifRiyadh Sorry! Don't understand what you want. Perhaps @Peter Bartholomew .

@KashifRiyadh 

You will need a VBA macro to perform such tasks.  The technical reason is that worksheet formulas implement a functional programming style in which values may be read and calculations performed, but nothing that already exists may be changed.  By way of contrast, VBA implements an imperative programming style that allows the state of the information held by the workbook to be changed.  In particular VBA will allow you to replace data within a database table as you require.