Excel: Continue Sequence with text and numbers - excel

I have a sequence in excel:
TEXT1-TEXT2-TEXT3_001
TEXT1-TEXT2-TEXT3_001
TEXT1-TEXT2-TEXT3_001
TEXT1-TEXT2-TEXT3_002
TEXT1-TEXT2-TEXT3_002
TEXT1-TEXT2-TEXT3_002
TEXT1-TEXT2-TEXT3_003
TEXT1-TEXT2-TEXT3_003
TEXT1-TEXT2-TEXT3_003
When I try to Auto Fill the sequence by selecting all of the above values and dragging the little box at the bottom right of the selected cells downwards, it starts with ...001 again instead of continuing with ...004. How do I make the sequence continue indefinitely?

Since this thread is finished for me, I am just copying #shrivallabha.redij 's comment here.
If you simply begin with TEXT1-TEXT2-TEXT3_001 and drag it down then it will work. Then all you need to do is : a. Paste the generated data twice and then b. Apply sort to regroup.

Related

Excel selective increment

Hi I'm trying to write a script in excel that returns a correlating job serial number (which resides on a different sheet) when a cell is filled with the job name.
=IF(D5="Misc",Jobs!A2,IF(D5=1715,Jobs!A3,IF(D5=1725,Jobs!A4,IF(D5=5640,Jobs!A5,IF(D5=6121,Jobs!A7,IF(D5=6150,Jobs!A8,IF(D5="6161-IDC",Jobs!A10,IF(D5="6161-JM",Jobs!A11,IF(D5=6161,Jobs!A12,IF(D5=6535,Jobs!A14,IF(D5="Hudson",Jobs!A14,IF(D5="Berendo",Jobs!A15,IF(D5="Berendo-Move",Jobs!A16,IF(D5="Bungalos",Jobs!A17,IF(D5="Bungalo",Jobs!A17,IF(D5="Camarillo",Jobs!A18,IF(D5="Indio",Jobs!A19,IF(D5="Lillian",Jobs!A20,IF(D5="6161-Beam",Jobs!A21,IF(D5="6161-Roof",Jobs!A22))))))))))))))))))))
The above script does what I need it to do, the problem is I need it copied to 30+ rows with ONLY the "D5" value incrementing. When I hover in the cell corner and drag down to new cells it increments other references besides the "D5" value.
I did a search and replace and manually copied the script to each of the 30 cells to get it functional for now but I'm going to have to do that every time I add a job. I'd like to just add the new job condition and use the fill handle to drag it to all cells, I feel like I need an escape character though to limit what cells are being incremented, I'm just not sure what that would be (it's always going to be column "D", I just need the row incremented to "d6, d7," etc)- thank you in advance for your help!
Seems a case sensitive replacement of A$ for A may be adequate:
=IF(D5="Misc",Jobs!A$2,IF(D5=1715,Jobs!A$3,IF(D5=1725,Jobs!A$4,IF(D5=5640,Jobs!A$5,IF(D5=6121,Jobs!A$7,IF(D5=6150,Jobs!A$8,IF(D5="6161-IDC",Jobs!A$10,IF(D5="6161-JM",Jobs!A$11,IF(D5=6161,Jobs!A$12,IF(D5=6535,Jobs!A$14,IF(D5="Hudson",Jobs!A$14,IF(D5="Berendo",Jobs!A$15,IF(D5="Berendo-Move",Jobs!A$16,IF(D5="Bungalos",Jobs!A$17,IF(D5="Bungalo",Jobs!A$17,IF(D5="Camarillo",Jobs!A$18,IF(D5="Indio",Jobs!A$19,IF(D5="Lillian",Jobs!A$20,IF(D5="6161-Beam",Jobs!A$21,IF(D5="6161-Roof",Jobs!A$22))))))))))))))))))))

Formula for taking only certain data from cells

I'm compiling a data chart where each horizontal cell is a separate transaction. I want to make it so the "Profits" column will have a formula that picks data from column E and C for the same horizontal data cell they are on.
I've been searching for this with no luck, probably because I'm not describing it correctly maybe.
I'm not sure whether I understood your question right but you can just use =C4+E4 assuming your current row is 4. Then move your mouse over the small little box at the bottom right corner and left click and move mouse down.
The number for the rows will be adjusted accordingly
Final result:
It looks like all you are wanting to do is perform some basic multiplication. This can be achieved using the following formula (only applied to one row for simplicity)
=C2*E2
Hope this helps!

How to calculate the number of times a particular letter is typed on a cell in Excel?

I know the title looks enormous but I don't know how to put the title to the question I want to ask.
Ok, basically this is what I have so far:
On the spreadsheet I a column asking a question and the you fill up the row and according what you have there you have to put a Y (yes) or N (no).
On the end of the month we need to know how many Y (yes) we have, I need to do this manually. I was wondering, if there is a way to use a separate cell to count how many Y's we have on that column?
If someone could help on that I will very much appreciate.
This is completely possible. Depending upon which version of Excel you're using (2007 and later should work), try pressing Functions, and then choose AddCount, which counts the amount of something in a certain space.
If this does not work for you, you can also create drop-down menus inside of the Data Validation feature of Excel.
If you're making a form these two options will work.
If you have a column (say column A) containing either Y or N, then in a cell outside that column enter:
=COUNTIF(A:A,"y")
This will perform the counting and will count either upper case or lower case letters.
Select the excel cell where you want the output. Then go to function box and type =COUNTIF(CL1:CL100,"Y")
where CL1 is your stating column Index and
CL100 is your last column index till where you want to search.

How do I remove duplicate content within a sigle excel cell

I have individual cells in excel with the following content in each of them
http://www.teng.mossdemo.com.au/wp-content/uploads/images/products/m1423.jpg|http://www.teng.mossdemo.com.au/wp-content/uploads/images/products/m1423.jpg
http://www.teng.mossdemo.com.au/wp-content/uploads/images/products/rt2899.jpg|http://www.teng.mossdemo.com.au/wp-content/uploads/images/products/rt2899.jpg
This is one cell in a long row for a dump of data for products within an ecommerce site. A data migration has somehow added the same image more than once to the same product. Each separate image image is separated by the Pipe "|" symbol.
I want to search each cell in this column of the sheet and remove the duplicated image reference and the Pipe symbol.
So the examples above become
http://www.teng.mossdemo.com.au/wp-content/uploads/images/products/m1423.jpg
and
http://www.teng.mossdemo.com.au/wp-content/uploads/images/products/rt2899.jpg
The suggested answer of finding the pipe with SEARCH is a good general answer, however in this instance as the source string is always twice the length of the desired we can just chop it in half with the formula below and drag it down.
=LEFT(A1,(LEN(A1)-1)/2)
In addition to a formula, you can use Data>Text to Columns, which is a good thing to know about. Select the entire column and then you up the dialog. In step one choose "Delimited" and in step two choose the pipe symbol:
When you're finished, delete the first column.
I figured out that this works for some more complex scenarios. I think it should work for this one as well.
=IFERROR(LEFT(C2,(FIND(LEFT(C2,20),C2,2)-2)),C2)
I entered this into D2 and copied it all the way down the column. I then copied and pasted the values back into Column C.
The problem I had was that not all of the cells in my column had duplicate text. Of those that did, the duplications were not delineated by any unique character (There was a single space in front of each duplication.), and the duplicated text was often an incomplete duplication so the length was not consistently symmetrical.
The "20" is an arbitrary number of characters I picked for excel to use from the front of the text to identify where the text started to repeat. There are enough people here who know excel better than I who can explain what the rest of the formula does. I figured it out by poking around.

How do I create an excel macro that changes the rows spanned by a cell

I am pasting a table into Excel from SAS where the number of rows spanned by the cell in the first column is variable. That is to say sometimes the first column is 3 merged cells, sometimes it is 6, etc. I would like to run a macro that changes the height of the first cell to be 10 merged cells, and to insert rows at the bottom to make space for this.
I'm a little stumped at how to approach this problem. Any assistance would be most appreciated.
Let me try to illustrate. If I wanted the first column to all span 4 rows, I might start with
_________________
|__________
______|__________
|__________
|__________
______|__________
and end up with
_________________
|__________
|__________
|__________
______|__________
|__________
|__________
|__________
______|__________
Thanks for your explanation. You just made that über tough. The problem is that although it seems you're just changing the height of your merged cell to be larger, you're actually creating a new merge in order to make the newly merged cell 4 cells high.
In your first illustration, you show two merged cells with address ranges of A1:A2 and A3:A6. In your second illustration, the addresses are A1:A4 and A5:A8, respectively.
In order for Excel to "change the height" (I use that phrase loosely) of the original merged cells at address A1:A2, it actually has to create a new set up merged cells at address range A1:A4. However, you won't be able to do that because address A3:A6 is already a merged range and these would overlap.
If you were to try to do this manually, you know that you would have to unmerge the lower group, remerge the top group, and the remerge the bottom group.
You could write a macro that, when executed, popped up an input box that asked the number of cells high the merged cell should be. However, your code would then have to analyze your original stack of merged cells and then unmerge and remerge everything programatically to make the change. This is certainly possible, but it could be a real pain (but also a fun challenge :).
I would ask yourself how badly you want to be able to exactly what you're looking for, because it's not exactly natural behavior in Excel.
My original post is below: now obsolete since I now understand what the author is asking
If you just want to change the height of the cells, you can use something like:
Rows("1:1").RowHeight = 27.75
However, I'm confused by your reference to merged cells. Are you just trying to change the height of a cell or are you also trying to merge cells together?
Whatever you are trying to do, you could select Tools -> Macro -> Record new macro , then manually perform the operation you need, then stop the macro and edit it in VBA to see the corresponding VBA commands to use in your program.

Resources