insert query

cahickm2

Board Regular
Joined
May 14, 2007
Messages
101
I need help with a query that inserts a date from above into blank cells in the same cloumn.

ex.
Date,Time
23/07/07, 00:00
blank
blank
blank
blank
blank
23/07/07, 01:00
blank
blank
blank
blank
blank

and so on.

The data I am working with covers and entire week (168 hours) and it is time consuming to copy and paste. Can someone help me please?
 

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.

giacomo

Well-known Member
Joined
Feb 20, 2002
Messages
1,796
this query assumes that you have a autonumber field (ID in my example)

Code:
UPDATE tblA SET tblA.Field1 = DMax("field1","tblA","tblA.ID <= " & [tbla].[id])
WHERE (((tblA.Field1) Is Null))
order by ID;

replace tblA with your table name, and field1 with your field name
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,682
Messages
5,838,787
Members
430,569
Latest member
sbardelli

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
Top