# Help me make such a macro on onliofis

**URL:** https://community.onlyoffice.com/t/help-me-make-such-a-macro-on-onliofis/5200
**Category:** Document Builder
**Created:** [17 June 2023 10:54 UTC](https://community.onlyoffice.com/t/help-me-make-such-a-macro-on-onliofis/5200 "2023-06-17T10:54:19Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Uchenichek](https://community.onlyoffice.com/user_avatar/community.onlyoffice.com/uchenichek/32/2816_2.png) [@Uchenichek](https://community.onlyoffice.com/u/Uchenichek)
#### Post date: [17 June 2023 10:54 UTC](https://community.onlyoffice.com/t/help-me-make-such-a-macro-on-onliofis/5200/1 "2023-06-17T10:54:19Z")

</div>

help me make such a macro on onliofis

```auto

Sub Кнопка1_Щелчок()
    Dim mycel As Range
    For Each mycel In Columns("D:D").SpecialCells(xlCellTypeConstants, 23)
        If mycel = [Сегодня] Then mycel.Offset(0, 1) = [Данной_значение]
    Next
End Sub

```

---

<div class="post-metadata">

### Author: ![Nikolas](https://community.onlyoffice.com/user_avatar/community.onlyoffice.com/nikolas/32/2509_2.png) [@Nikolas](https://community.onlyoffice.com/u/Nikolas)
#### Post date: [19 June 2023 14:32 UTC](https://community.onlyoffice.com/t/help-me-make-such-a-macro-on-onliofis/5200/2 "2023-06-19T14:32:47Z")

</div>

Hey @Uchenichek

We are glad to welcome you to our forum! 👋  
What issue are you facing?

---

<div class="post-metadata">

### Author: ![Uchenichek](https://community.onlyoffice.com/user_avatar/community.onlyoffice.com/uchenichek/32/2816_2.png) [@Uchenichek](https://community.onlyoffice.com/u/Uchenichek)
#### Post date: [20 June 2023 09:12 UTC](https://community.onlyoffice.com/t/help-me-make-such-a-macro-on-onliofis/5200/3 "2023-06-20T09:12:04Z")

</div>

> [@Nikolas](#):
>
> We

I need to convert this macro to js

---

<div class="post-metadata">

### Author: ![Nikolas](https://community.onlyoffice.com/user_avatar/community.onlyoffice.com/nikolas/32/2509_2.png) [@Nikolas](https://community.onlyoffice.com/u/Nikolas)
#### Post date: [23 June 2023 09:04 UTC](https://community.onlyoffice.com/t/help-me-make-such-a-macro-on-onliofis/5200/4 "2023-06-23T09:04:16Z")

</div>

Hi @Uchenichek

Unfortunately, we do not have automatic conversion of the visual basic \> JavaScript macro.  
It is necessary to do everything manually.

Usually, users write about problems or questions about available methods 🙃  
[Getting started with macros](https://api.onlyoffice.com/plugin/macros)

You will need methods such as:  
[GetRange](https://api.onlyoffice.com/docbuilder/spreadsheetapi/apiworksheet/getrange)  
[ForEach](https://api.onlyoffice.com/docbuilder/spreadsheetapi/apirange/foreach)  
[GetValue](https://api.onlyoffice.com/docbuilder/spreadsheetapi/apirange/getvalue)  
[GetRow](https://api.onlyoffice.com/docbuilder/spreadsheetapi/apirange/getrow)  
[SetValue](https://api.onlyoffice.com/docbuilder/spreadsheetapi/apirange/setvalue)

Check your private messages
