What is the method for moving cell values one by one from a sheet to cells on another sheet in Excel?

Please explain the method of reading cells using Read Range in a data sheet and then sequentially pasting them into cells on another Excel sheet. Thank you in advance!

Hi @22222222asas ,
Can you share input and expect output ?
You can use read range then check row value then write cell to other sheet
Regards,
LNV

@Nguyen_Van_Luong1
“Could you please provide instructions on how to use a foreach loop to perform the task step by step?”

hi @22222222asas ,
This requirement, I understand that you need to get the data in a sheet and then check the value.
then move the value to another sheet,
That’s right?
(I want to get a picture of the input and expect a clear result)
my steps on my way,

if writing to another file, you can use another range, specify the cell to write to, possibly variable, eg: A + index.toString()
regards,
LNV

1 Like

@Nguyen_Van_Luong1

Thank you so much
“Is it possible to write a code that allows continuous input like a1, a2, a3, and so on?”

Hi @22222222asas ,
You can create a value index type in32 with default value is 1
each loop +1 to index
write cell with value cell excel and index


Regards,
LNV

1 Like

@Nguyen_Van_Luong1

Thank you so much
“Is it necessary to include an if statement?”

No, it’s not necessary.
Like I said, because I don’t know the requirements, I have to demo like this
you can leave it out if not needed for your requirement
Regards,
LuongNV

1 Like

@Nguyen_Van_Luong1

“I would like to create it like this. Could you possibly help?”

Hi @22222222asas ,
each loop you can +1 for index
then get value by row of data
write cell is string, not data table

another thing is that you leave scope in a loop of another scope will slow down

Can you create a demo file for input and output?
or I will create it if you can’t share
regards,
LNV

1 Like

Can you make it for me? Thank you."

Hi @22222222asas ,
I created input file
image
1.xlsx (8.3 KB)

then I will read it and write cell to other file,
I can add value at multi column B,C… and write cell them similar column A,
my code,
test.xaml (10.1 KB)
my output
2.xlsx (6.5 KB)

but the most accurate, please let me your in/out,
Regards,
LNV

1 Like

Hi @22222222asas

We don’t require the index of increment for the loop, if you try like this !
and this are the input and out of the data .
image

and also I have attached the xaml please check !
Mapping the data.zip (2.1 KB)

1 Like

@Nguyen_Van_Luong1
Thank you so much
Have a Nice day!

1 Like

@Praveen_Mudhiraj
Thank you so much
Have a Nice day!

thanks @22222222asas ,
have a nice day too :grinning:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.