If any of the numbers are above 0 (like in D9), I need to obtain the data in cells:
B9
D9
D4
I then need to write it back the above information to a Main spreadsheet.
The Excel can have any number of rows (this will be ran on 100 spreadsheets so they vary a little), the Columns may run from B to K or B to AE but they’ll all need to be checked for the digits in them. If D9 has a number above 0, D10 or any other cells in row D could also have a number above 0 in it too.
You don’t work with Excel using UI automation (ie open Excel, click and type etc). You use the Excel activities. For example, Read Range into a datatable. Find the values you want in the datatable by looping through the datatable rows and columns. Based on the row index and column index, you can then know the row and column that the value was in in the Excel file.
I’m trying to use Read Range but don’t know how to find what i need to in the DataTable, that’s what i was hoping to get help with. I know not to use UI Automation
I’m having one slight issue though… all the Cells in Column B are numbers so it’s picking up every one. I made a change to ignore Column B but it’s writing back to the Main Spreadsheet like this:
So I want the value in the cell with the number in (in my example, 1 because it’s in D9), and what is in B9.
I know you’ve gone to loads of effort already and I appreciate it so much, I’ve been working on this for the past 4 hours without trying to ask for more help but I’m stuck haha