Adding worksheet to a Work Queue, but it keeps blank - blueprism

I'm getting a worksheet as Collection, then I add it to a queue, and it "works fine", but when I look in the collection I see a lot of informations, and a lot of rows (more than in the worksheet, I don't know why), and when I look in the queue it is only with one empty row, therefore, presenting the same columns titles as in the collection.

Get Next Item is retrieving a blank item because you're adding items with blank fields into the work queue.
The reason there are blank rows in your Excel data is because the Get Worksheet As Collection stage is pulling everything from A1 to the last used cell in the worksheet (if you open the file in Excel, hit Ctrl+End and it'll bring you to the last used cell; this is the range that Blue Prism will be pulling).
So because you're queuing blank rows, and because Get Next Item pulls items one at a time out of the work queue, it will end up pulling those blank rows.
I'd suggest either fixing the input - remove the blank rows on the Excel sheet - or use the Collection Manipulation object to remove empty rows before adding them to the work queue.

Related

Macro to Look up words in a column from a word list on seperate sheet, then copy row to new sheet

I'm still pretty clumsy with Macros and have only managed to get this working by running lots (i mean lots!) of seperate scripts to achieve the task, and it takes way too long handling large data sheets..
I need a way of filtering out certain rows based on a list of words on another sheet.
I have a sheet of raw data containg the stocked items, warehouse locations and quantities etc...
I need to look through the 'Long description' (Sheet1, Column E) and look for words that appear in the word list on a seperate sheet (Sheet2, ColumnA, if there is no match, then copy row to a new sheet.
So for instance, i want to filter out the word 'Guard' i'll add this to the list, and only rows not containing 'Guard' shall be copied over,
So adding 'Guard' to my word list on Sheet2, ignores rows 4 & 5, and copies the other rows to Sheet3
The raw data can be thousands of lines, and my 'word list' is a couple of hundred words i need to filter out.
I can do this manually, which can take hours or days!, and i've tried automating this one script at a time, but it still seems to get it wrong, or crash in the process.
I've found a few scripts that are close to what i need, but they only look for an excact match in the cell, not a partial string.
I also want to copy the row, not move it.. as i want to preserve the raw data on sheet1
I hope this makes sense :)

Reference to single cell array in a merged cell

I am working on a list of employees with multiple sheets, and need all the sheets to collect the names from the ADMIN sheet. This is to enable management to delete a record on the admin page, and the other sheets to automatically remove the record as well. The LEAVE sheet, needs to have the names in a merged cell as indicated.
If I reference them one by one, I get a #REF! when a cell is deleted in ADMIN, and the formulas in the rest of the table gets mixed. If I do it by dragging down, the formula identifies the merged cell as 3 rows (understandable), but I need a way to change that. It needs to be treated as one row. Please help with any way to do that, or another solution to display the given information.
Use INDEX and some MATH:
=INDEX(Admin!A:A,(ROW($ZZ1)-1)/3+2)
The 3 is the number of rows per merged cell. The 1 is the start row of the list on Admin. Adjust accordingly. The $ZZ1 reference is just a counter and does not matter what column as we only care about it starting in row 1.
Now as the rows in Admin are deleted it will not return ref and the names will move up accordingly.
before deletion:
After deleting Name2 on the Admin Sheet:

I am trying to write VBA code that will remove all rows after the last row of data but only within a certain range of rows

I cannot find a good solution that will only delete rows after the last row of data but stops at a certain row. After row 3000 I have some legal language that needs to stay. So, I only want to delete all rows from the last line to row 3000. I have tried this:
On Error Resume Next
Range("A5:A3000").Select
Selection.SpecialCells(x1CellTypeBlanks).EntireRow.Delete
But it is not deleting the rows, probably because it is not identifying blank cells correctly.

How to check for a particular value in a column and delete the entire row corresponding to its value?

I have a set of 100 part numbers in a particular sheet and want to eliminate the data corresponding to those 100 part numbers from my Master Part List sheet (which contains a huge list of parts). I don't know how to proceed for this?
The Advanced Filter will do this for you fairly easily. If you have a sheet with the part numbers listed, you can use that as the criteria range. Once filtered, simply delete the visible rows and remove the filter.
Advanced Filter setup
Delete visible rows
Once deleted, you can clear the filter to get back to normal.
You can run a LOOP to go through and delete the rows with the corresponding parts. I'm practicing VBA, but this should be exactly what you want.
Edited out incorrect code.

How to link worksheets in excel to allow inserting new rows

I have a master sheet which is made up of data from 5 sub sheets. The data is updated in the sub sheets and then linked to the master sheet.
I want to be able to add new data (rows) to the sub sheets and have the master sheet update automatically. I used the INDIRECT function, but it requires me to estimate the max number of rows and then copy the function that far. This leaves my master sheet with large white spaces where the link switches between sub sheets. Ideally I would like to be able to have the master sheet be continuous with no white space in the middle of the data.
This is the function I used:
=OFFSET(INDIRECT("'Sheet1'!A2"),ROWS($A$2:A2)-1,COLUMNS($A$2:A2)-1)
Note:
My data starts in row 2 because row 1 has heading data.
little confused as to what you are trying to do exactly but
using the count function so you don't have to estimate the rows?
=OFFSET(INDIRECT("'Sheet1'!A2"),0,0,Count($:A),Count(A:A))
also what's in cell sheet1 A2 that you need indirect? is it just to point to the name reference for the subsheets? which if is the case then i assume all sub-sheets are formatted the same?
=OFFSET(INDIRECT("Sheetname"&"!A1"),0,0,count(indirect("sheetname"&"!A:A")),count(indirect("sheetname"&"!1:1")))
again i'm not exactly clear as to what you are trying to accomplish

Resources