How to fetch same cell value for all merged cells

Hi All,

I have the data as shown below

image

And I need the datable as below.

image

Is that possible? Using read range and writing to the data table is not helping, A6, A7 and A10 are coming blank that way

1 Like

Hi @Krithi1 ,

Please check this thread

Regards,
Rajeswari

I can’t use Balareva or any other activities because of the security reasons. I can use only Uipath packages

Hi @Krithi1

Without the Balareva activities, you can VBA scripts to get the merged data from the cells but for that also range of the Merged area should be known to fetch the value.

@Nithinkrishna , @Rahul_Unnikrishnan , @THIRU_NANI - Can you guys please help with this scenario ?

Regards,
Rajeswari

1 Like

@Rajeswari24 - that’s correct, I have the code to merge cells, but before that I need to get the cell range since it keeps changing. Any vba code to validate the cell values and then merge?

Hello @Krithi1

You can refer to the below post. It can help you to solve this.

Hey @Krithi1

You can read the DataTable from the Excel and do a bit of manipulation, which should be sufficient enough !

Thanks
#nK

@Rahul_Unnikrishnan

That solution worked, but unfortunately I can’t use I can’t enable the macros in my excel settings due to security reasons.

@Nithinkrishna

Could you please give me little idea on how can I manipulate that?

1 Like

Hey @Krithi1

When you Read your first DataTable after S.No. 4 you will have two empty values in next two rows for S.No

So you need to iterate through the Table first and see if there is some empty S.No if yes just assign the previous row S.No to it.

That’s it.

Hope that helps.

Thanks
#nK

Hi @Krithi1

Implemented the same solution in this xaml.
AddingPreviousRowValue.xaml (9.0 KB)

Regards,
Rajeswari