Continue search in another sheet where previous cell left off - excel
Cell C19 in a sheet looks up a certain word in cell B3
Cell C19 also checks whether there is a Yes in another sheet according to criteria in B3 in relative column 140 in that other sheet. If this is the case, it writes Yes in the cell, otherwise it writes Not reported (the formula: =IF(VLOOKUP($B$3,'some_sheet-1'!$B$5:$ATN$217,140)="","Not reported",IF(VLOOKUP($B$3,'some_sheet-1'!$B$5:$ATN$217,140)=0,"Not reported",(VLOOKUP($B$3,'some_sheet-1'!$B$5:$ATN$217,140)))))
Cell B20 then checks if there is a Yes in cell C19
If this is the case, cell B20 will lookup what is in cell B3and match de word to the line of another sheet (some_sheet-2), and if the result is a Yes in that cell, it will print out the header of the corresponding result.
If it does encounters a No, it will go to the next designated column and look for a Yes and so on until it finds one, if not it will write Not applicable or no data submitted
The formula in cell B20:
=IF($C$19="Yes",IF(VLOOKUP($B$3,'some_sheet-2'!$B$5:$BO$217,7)="Yes",'some_sheet-2'!$H$4,IF(VLOOKUP($B$3,'some_sheet-2'!$B$5:$BO$217,11)="Yes",'some_sheet-2'!$l$4,IF(VLOOKUP($B$3,'some_sheet-2'!$B$5:$BO$217,15)="Yes",'some_sheet-2'!$P$4,IF(VLOOKUP($B$3,'some_sheet-2'!$B$5:$BO$217,19)="Yes",'some_sheet-2'!$T$4,IF(VLOOKUP($B$3,'some_sheet-2'!$B$5:$BO$217,23)="Yes",'some_sheet-2'!$X$4,IF(VLOOKUP($B$3,'some_sheet-2'!$B$5:$BO$217,27)="Yes",'some_sheet-2'!$AB$4,IF(VLOOKUP($B$3,'some_sheet-2'!$B$5:$BO$217,31)="Yes",'some_sheet-2'!$AF$4,IF(VLOOKUP($B$3,'some_sheet-2'!$B$5:$BO$217,35)="Yes",'some_sheet-2'!$AJ$4,IF(VLOOKUP($B$3,'some_sheet-2'!$B$5:$BO$217,39)="Yes",'some_sheet-2'!$AN$4,IF(VLOOKUP($B$3,'some_sheet-2'!$B$5:$BO$217,43)="Yes",'some_sheet-2'!$AR$4,IF(VLOOKUP($B$3,'some_sheet-2'!$B$5:$BO$217,47)="Yes",'some_sheet-2'!$AV$4,IF(VLOOKUP($B$3,'some_sheet-2'!$B$5:$BO$217,51)="Yes",'some_sheet-2'!$AZ$4,IF(VLOOKUP($B$3,'some_sheet-2'!$B$5:$BO$217,55)="Yes",'some_sheet-2'!$BF$4,IF(VLOOKUP($B$3,'some_sheet-2'!$B$5:$BO$217,59)="Yes",'some_sheet-2'!$BH$4,IF(VLOOKUP($B$3,'some_sheet-2'!$B$5:$BO$217,63)="Yes",'some_sheet-2'!$BL$4,""))))))))))))))),"Not applicable or no data submitted")
That was the easy part…
Now, what I need is that cell B21 does (almost) the same as the formula in cell B20. The twist is that it should 'take off' where cell B20 left.
What cell B21 should do:
Check if cell B20 contains the words Not applicable or no data submitted
If this is the case, stop there (leave the cell blank)
If it contains one of the column titles of some_sheet-2, go to the next column and do what cell B20 was doing…
Then what cell B21 does could be repeated over and over…
I realised that in order for cell B21 to find out where to begin, this should be defined. I therefore created a formula in cell A20 that looks up what appears in cell B20 and finds the address of that cell in some_sheet-2:
=CELL("address",INDEX('some_sheet-2'!$H$4:$BL$4,MATCH(B20,'some_sheet-2'!$H$4:$BL$4,0)))
Does anyone have an idea what formula to write in order to realise the above mentioned (without resorting to VBA)?
Related
Excel - Look through value for a particular column and paste in another sheet
I have a column with cells value is either 1 or empty / 0 I want to loop through individual cell from B4 to B50 to check the value in this sheet called "Data". If value is 1, then copy the cell content on the left (A4) to another sheet called "Main" at B2. While copying, it need to check the cell (B2) is empty, if not, check next B3, B4 and paste to next empty cell. Pasting into cell should retain the format of the words (e.g. Bold,italic, if there is) and colour of the cells that is copying from. Then return to "Data" sheet and resume checkin for value 1. Loop until B50. Appreciate using excel 2016 VBA. I tried a few type of codes but remain error.
Hide and Show Rows in Sheet2 depending on values on Sheet 1
I am having trouble with this issue for a week and haven't been able to make it right. I have several cells in sheet1 in that when empty, the corresponding cell in sheet2 will be hidden, once the cell in sheet1 is NOT empty, the corresponding cell in sheet2 will be shown. For example: Sheet1: A1, A5, A10, A15 will be the cells that If blank, then: If A1 is blank, then sheet2 row 1 will be hidden, once it's not blank, the row will be shown. If A5 is blank, then sheet2 row 2 will be hidden, .... If A10 is blank, then sheet2 row 3 will be hidden, ... and so on The objective is that if someone types their name on A1 (for example), the row in sheet 2 will be shown, and they will use the information of that row. If the person decided to write the name in A5, then the row 2 from sheet 2 will be shown, instead and so on... Is there a way to use VBA code to do that automatically so that it is easy to use for other people?
Excel: Reference a formula in a cell from another worksheet where rows are added
help is appreciated on this topic! I am trying to reference cell B10 from Sheet2 to cell A1 in Sheet1. Cell B10 contains the formula SUM(B1:OFFSET(B10,-1,0)), which sums values from B1:B9. Daily, I add a new row to Sheet2 such that the Column B range increases by +1, from B1:B9 to B1:B10, and the formula from B10 moves to B11. I now need cell A1 in Sheet1 to reference cell B11 in Sheet2. I've tried using offset() and indirect() but haven't figured this out. Thanks for help!
There are (at least) two ways to handle this: 1) Every time you insert the row, make sure you place your cursor on the formula cell before manually inserting row. If you do, the formula in Sheet1!A1 will automatically follow suit, and you can add whatever you need in the new cell (created from the new row). For example, inserting a row at B10 will adjust the formula in A1 to say =Sheet2!B11. 2) Realizing that point 1 may not be suitable to your process, place this formula in Sheet1A1: =OFFSET(Sheet2!B1,COUNT(Sheet2!B1:B100)-1,0) You can adjust the B100 to whatever you need. Just be sure there's nothing in between the the final formula cell and the last row in the this formula range.
Auto fill cells in excel from drop down list
I just want to know how to autofill all cell if I select value from 1 cell using drop down box. Suppose in 1st cell of the row I will select "Yes", then all the 5 adjacent cell of that row will also show "Yes". ther is data validation activated in all cell, but i dont need to select it each time.
If the dropdown is in A1 then just make B1 be: =A1 so it shows whatever is in cell A1
Formula to grab value from a cell and use that to refer to a cell in another spreadsheet?
I need help creating a formula in a cell in a spreadsheet that would allow me to grab a value from another cell and use that value to refer to yet another cell in another sheet. For example, in a cell that returns a student's class grade (a progress report sheet) I have the cell refer to my master grade sheet (eg. the progress report sheet's cell would be: =mastersheet!E[grab value in cell A1 of current sheet]) What formula do I use to grab a cell's value and use it to define/refer to another cell?
In Excel, if Sheet1 A1 contains B2 then in Sheet1 =INDIRECT("Sheet2!"&A1) will return the contents of Sheet2!B2. In Google Docs spreadsheet, if Sheet1 E1 contains 4 then in Sheet1 =Indirect("Sheet2!E"&E1) will return the contents of Sheet2 Cell E4.