Excel coding using while loop - excel

so I have a loooot of work that I need to do and it's basically just capturing data that are in different excel tabs, so I have a formula that gets the values from each different excel tab and then arranges it in the order I need so that I can simply copy and paste now what I do is change ='Tank 3'!12 to ='Tank 3'!S12 then highlight each row and use find and replace to change 12 to 13, 14 , 15 etc as there a lot of rows worth data in each tab, I was wondering if i could use a while loop in excel to accomplish this? Instead of going through 42 rows manually using find and replace? Any help will be much appreciated

Related

Dynamic sort top/bottom N values in excel 2019

I'm currently using excel 365 but need to make a spreadsheet compatible with 2019. I have a list of unique departments each with a specific volume of production. I need to create a dynamic filter for the bottom 5 producers, along with a vlookup alternative to get the values so I can graph them.
In excel 365 it's as simple as
Departments: =FILTER(Metrics!$B$2:$B$41,Metrics!$AL$2:$AL$41<E22)
Values: =IFERROR(VLOOKUP(D25#,Metrics!$B$2:$AM$41,37,FALSE),"")
The table goes from A1:A41 with row 1 being the headers.
I've tried using MIN and SMALL but can't figure out how to get more than one value. I'm open to but would prefer not to use VBA if I can help it.
For a function using SMALL, you'll have to use it in an array.
To do that, type out your formula, then instead of hitting enter like usual, press 'ctrl + shift + enter' to tell Excel to use an array. This will put {} around your formula to indicate it worked properly. From there just drag your formula down your desired amount of columns and should be good to go.

working with multiline cells without spliting them in Excel

I have a table with hundreds of rows in a very heavy excel workbook, I give a simplified like so:
And another table with combined text:
Is there a way I could have a formula that would allow me to check in the 1st table the individual values of each multiline cell and then add them in the total, to obtain something like this:
The point here being that the file might change in the future, rows could be added or deleted and so on, so I would like to be able to obtain the totals without splitting the multiline cells.
I've tried countIf but I don't think that's the proper way to go. Any help would be appreciated.
Multiple options really. You could try:
Formula in B10:
=SUMPRODUCT(ISNUMBER(FIND(A$2:A$7,A10))*B$2:B$7)
Or, a bit more in line of checking each individual value inside your combination:
=SUMPRODUCT(VLOOKUP(FILTERXML("<t><s>"&SUBSTITUTE(A10,CHAR(10),"</s><s>")&"</s></t>","//s"),A$2:B$7,2,0))

Excel: Find and select multiple cells

I am an excel noob with a massive and weirdly organized spreadsheet that contains several columns with hundreds of account number values.
I have identified 70 of these accounts that are "special" based on criteria not in this spreadsheet. I wish to select EVERY cell containing one of the 70 identified account ID's but I cant figure out how to do this. The Excel search function doesn't have any OR operator.
Is there a simple way to do this? If not can someone please be really specific when describing the hard way to do it? I'm sure this can be done somehow.
Thank you so much!
And in addition to Tim’s question: do you have the 70 accounts in a table somewhere? If so, you might be able to use VLOOKUP.
Well you can just press Shift and click on every cell you want to selec withaut stopping pressing it.

how to auto populate in excel written numbers

this is a very simple question, but I can not find a way arround it. I am working ona MATLAB project and I need to convert numbers from 1 to 1000 to the written form I.E(one, two, three, four...) since I do not know how to do this in MATLAB I was just going to autopopulate the numbers in MS Excel and import the data directly into MATLAB. My problem is I do not know neither how to autopulate numbers in their written form in Excel since it does not work as I would normally do. I.E :Typing one, two, three, four in separate cells; selcting the values and dragging until I hit 1000. Once I start dragging it just repeats the values over and over. I would appreciate if anyone could help me with this issue either in MATLAB or MS Excel. Thank you
To find the auto-populate lists in Excel, go to Options>Advanced>General>Edit Custom Lists
As you can see below, written form numbers are not included in these lists, which explains why they do not autofill when you drag down.
As pnuts alluded to in the comments, a good way around this in Excel would be to create a custom function that will generate a written form number for any numeral cell value. This has already been done by Microsoft support and is very easy to implement by pasting the code on this link into the Visual Basic Editor in your workbook. (credit to pnuts)
https://support.microsoft.com/en-us/help/213360/how-to-convert-a-numeric-value-into-english-words-in-excel
Once you've done that, you just put your numbers from MATLAB into column A, then paste this formula into B1 and drag down.
=SpellNumber(A1)

Deleting rows in excel without affecting the Excel formula

I have a spreadsheet where Iam trying to add the serial numbers in each row using the below formula
=IF(C149<>"";MAX($B$149:OFFSET(B150;-1;0))+0.1;"")
However, whenever I delete the rows in B column there will be error value in all other rows like #N/A
Whether it is possible to delete the rows without affecting the Formula ?
I heard there is a excel function "INDEX" to be used, please reply with your answers how to apply INDEX function to the above Formula
Not exactly the answer you were asking for, but google picks this out for deleting without breaking formaulas - so anyone landing here from google...
The formulas break because you are removing cells from the spreadsheet - chainging the structure of the sheet. Where as what you want to do is just remove the data, and have all the remaining data move up.
One way is to select all the data below the line you want cleared (plus one blank line at the end) - then copy that range (to the clipboard) and paste it all back in one row higher.
Not a great solution - but it works - I found this question looking for a better way! :)
The issue could be related to $B$149 When you delete a row the $ means that the 149 cannot change accordingly like the C149 and B150 would , this may then mean that it is pointing to incorrect data after the deletion.

Resources