Forum Discussion

DonnyBahama's avatar
DonnyBahama
Copper Contributor
Aug 10, 2023
Solved

Get data from input form, send it to a worksheet and row based on form values

I have a workbook with a data input form (for entering the sales numbers for today) which has a cell with    =TEXT(TODAY(),"mmm")   to display the (short/3-character) current month and a simila...
  • HansVogelaar's avatar
    Aug 10, 2023

    DonnyBahama 

     

    Let's say that the cell with the month formula is A2 and the cell with the day formula is A3

    And let's say that the month sheets have a header row, so day 1 is in row 2 etc.

     

        Dim w As Worksheet
        Dim r As Long
        Set w = Worksheets(Range("A2").Value)
        r = Range("A3").Value + 1
        ' Populate a cell in column D of the r-th row of worksheet w
        w.Range("D" & r).Value = ...

     

    Does that help you on your way?

Resources