Adding current date to next available line in the range

boninm

New Member
Joined
Jan 31, 2025
Messages
9
Office Version
  1. 365
Platform
  1. Windows
hello

I found a code to find the next available row in the range.
Now I want to use the reference it giving me to add the current date
I'm lost on how to do that.
Can anyone help me.

Thank you in advance

How to find the first blank cell in a range in Excel.xlsx
ABCDEFGHIJK
1https://spreadsheetweb.com/find-the-first-blank-cell-in-a-range-in-excel/#
2
3Range = B7:B14
4Position of 1st blank cell3
5Address of 1st blank cell$B$9
6DateFormula above:=CELL("address",INDEX(B7:B14,MATCH(TRUE,ISBLANK(B7:B14),0)))
72025-01-21
82025-01-27
9
10
11
12
13
14
15
16
Sheet1
Cell Formulas
RangeFormula
E4E4=MATCH(TRUE,ISBLANK(B7:B14),0)
E5E5=CELL("address",INDEX(B7:B14,MATCH(TRUE,ISBLANK(B7:B14),0)))
E6E6=FORMULATEXT(E5)
 
Nope, that didn't work

rework another code that is working. Here it is

VBA Code:
    '[URL='https://learn.microsoft.com/en-us/office/vba/api/excel.worksheet.range']Worksheet.Range property (Excel)[/URL]
    '
    For Each vDate In Worksheets("Main").Range("B5:B13")
        If IsEmpty(vDate.Value) = True Then
            vDate.Value = Date
            Exit Sub
        End If
    Next vDate
 
Last edited by a moderator:
Upvote 0
Solution

Forum statistics

Threads
1,226,771
Messages
6,192,918
Members
453,766
Latest member
Gskier

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