Hi Dorian,
I you like to know how to move from one range down in the active sheet or move column to the right.
Thank you!
Excel functions to move
Moderators: Dorian (MJT support), JRL
- Dorian (MJT support)
- Automation Wizard
- Posts: 1386
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: Excel functions to move
This blog post might help.
Yes, we have a Custom Scripting Service. Message me or go here
-
- Pro Scripter
- Posts: 90
- Joined: Fri Jan 31, 2020 10:52 am
Re: Excel functions to move
Thank you Dorian!
I don't use VBA in the workbook but the link is a good reference that I will studie later on.
Let say I loop a listbox and for every result I get I want to set a cell and go move row down 1 row.
I am able to do it for one result. The problem is to move to down 1 range.
Than you again!
I don't use VBA in the workbook but the link is a good reference that I will studie later on.
Let say I loop a listbox and for every result I get I want to set a cell and go move row down 1 row.
I am able to do it for one result. The problem is to move to down 1 range.
Than you again!
- Dorian (MJT support)
- Automation Wizard
- Posts: 1386
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: Excel functions to move
I see. So it's really just posting to cells? To move down, just add 1 to the row. You can do this in a loop
This would post to cells A5,B5,C5,D5,E5 on the first cycle, then A6,B6,C6,D6,E7 on the seconds, and so on. Of course just to set one cell you'd need 1 line and not 5, but this is a good example of posting to rows and columns.
So you'd just incorporate this into whatever loop you have.
This would post to cells A5,B5,C5,D5,E5 on the first cycle, then A6,B6,C6,D6,E7 on the seconds, and so on. Of course just to set one cell you'd need 1 line and not 5, but this is a good example of posting to rows and columns.
So you'd just incorporate this into whatever loop you have.
Code: Select all
Let>XLRow=5
XLSetCell>xlbook,Sheet1,%XLRow%,1,this,res1
XLSetCell>xlbook,Sheet1,%XLRow%,2,that,res2
XLSetCell>xlbook,Sheet1,%XLRow%,3,them,res3
XLSetCell>xlbook,Sheet1,%XLRow%,4,him,res4
XLSetCell>xlbook,Sheet1,%XLRow%,5,her,res5
Let>XLRow=XLRow+1
Yes, we have a Custom Scripting Service. Message me or go here
-
- Pro Scripter
- Posts: 90
- Joined: Fri Jan 31, 2020 10:52 am
Re: Excel functions to move
Thank you so much!
Again you made my day.
Again you made my day.
- Dorian (MJT support)
- Automation Wizard
- Posts: 1386
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: Excel functions to move
Always happy to help.
Yes, we have a Custom Scripting Service. Message me or go here