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?
 

Some videos you may like

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

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
 

Watch MrExcel Video

Forum statistics

Threads
1,123,334
Messages
5,601,012
Members
414,421
Latest member
tonybear1994

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