How to scan a column for a certain word and when triggered, remove the first 4 characters - vba

Hey everyone so here is my setup
My issue is regarding the "C" column and how to remove the "2nd|" and "3rd|" portions so it ONLY shows "Mikes Auto Shop" "Carls Auto Repair" etc
Like this

Just a formula in D2 will do the trick
=RIGHT(C2,LEN(C2)-4)

https://www.mrexcel.com/forum/excel-questions/375502-remove-first-letter-each-cell-column.html
on the forum here they mention that you can use =RIGHT(A1,LEN(A1)-1), for you it would look more like =RIGHT(C1,LEN(C1)-1) and you would place it in the D column and then just grap the bottom right hand corner and drag it down the will give you all the values you need in the D column, hope this helps

If there is only sometimes a prefix or if it can be larger than 9, you can use:
=RIGHT(C2,LEN(C2)-IFERROR(FIND("|",C2),0))

Related

Can you help me with this simple RobotC exercise?

I mean 2. Second Length found here
I think I found all mistakes but still, I can't seem to get the right answer.
On line 8 it should be wait1Msec(3000); instead of wait1Msec(4000);
Swing turn to the right should be written as 100 power for C and 0 power for B. I also tried -100 for B and even exchanged letters just in case I misunderstood which of the motors is left and which is right, but I still got the wrong answer (according to the website).
There are mistakes in the comments as well, but that shouldn't be a problem since they're just comments! Still, I corrected them just in case. Replaced 4 with 3 and replaced right with left, still not correct.
Do they expect me to right some specific text in the comments? Or am I missing something?
It seems that you should write the code for your second length after the comment
//END OF FIRST LENGTH
So, your code should be a code for the first length and the second length. I hope that helps.

Adding various number of dots in excel

I have a lot of excel files looking like that:
Example:
My goal is to make it look like that:
To do that, I used very simple excel's function:
=F7&" "&G7&".........cat."&" "&H7&" times "&I7&CHAR(10)&F8&" "&G8&".........cat."&" "&H8&" times "&I8&CHAR(10)
The thing is, the number of dots placed before "cat" is not constant. It depends where the previous sentence ends and my formula doesn't take it into account - it always adds 9 dots, which means I have to add the rest of the dots manually.
Any ideas how to make it work? :D
The REPT function can do this. Use LEN to calculate the length of what you're adding the dots to, then subtract that from the desired width of the result. That will repeat the dot enough times to fill the column. For example, if you want the text with dots to be 40 characters, right padded with .:
=F1&" "&G1&REPT(".",40-LEN(G1))&"cat."&" "&H1&" times "&I1&CHAR(10)&F2&""
=LEFT(A1 & REPT(".",22-LEN(A1))&"cat",25)
22 = fixed width - len("cat"), 25 - fixed width.
edit - i revised because my original answer was not correct but I see Comintern has posted a similar response since.

Splitting information from a cell

My sheet contains three types of cells:
5off
50off
550off
What they should read is:
$5.00 Off
$0.50 Off
$5.50 Off
I've been fighting with Text-to-Columns and =concat for a while and am trying to get this to work as easily as possible. Any ideas?
Just wondering what's the rule of the conversion for example the first figure is
5off => "$5.00 Off" > split number, add decimal, upper the O in off, concatenate
However in number two the rules are a little different
50off => "$0.50 Off" > split number, make the number decimal, concatenate
Based on those limited information I will suggest you to break down your problem to simpler form:
See image below, the top is the result, bottom is the formula used. There might be simpler way though.
Hope this help

Arrange Excel Cell Row Data under relevant columns

I have a large file of excel data where row data is not present under the relevant columns.
Name City School College Address
City:abc Name:abc College:abc Address:abc School: abc
City:abc College:abc Name:abc School: abc Address:abc
I have hundreds of such rows.
What I want is something like this :
Name City School College Address
Name:abc City:abc School:abc College:abc Address:abc
Name:abc City:abc School:abc College:abc Address:abc
I have identifiers before semicolon (:) in cell, but can't seem to match it to the column.
I have tried MATCH() Function for identifiers like School etc. but it can't work because Exact Match (Third field of MATCH() Function) won't work, other options can cause errors. Also Filter() doesn't seem to work either.
Kindly help me with an approach that can automate this. Can a formula be made for this or VBA code can work ?
I don't want to do so much manual work.
THANKS
EDIT
ANSWER:
Thanks Karpak for the answer. I just came up with the following solution before visiting your post.
For others, who are facing a similar problem, try this:
=INDEX(range, MATCH("SearcItem"&"*",Range,0), 1)
This will return the value of the cell after matching it up.
Happy Coding :)
Match with wildcard should work. Try with
=MATCH("Name:*",1:1,0)
=MATCH("College:*",1:1,0)
=MATCH("Address:*",1:1,0)
=MATCH("City:*",1:1,0)
=MATCH("School:*",1:1,0)
The above works for row 1. If you want to make it for row two replace 1:1 with 2:2 or if you want a specific cells, use A2:E2 etc.

How to get this sort of format using dojox TableContainer?

I need to have something like :
textbox
textbox button
checkbox
I am using the dojox.layout.TableContainer to contain the elements.
The code I wrote is in this fiddle - http://jsfiddle.net/sNACz/71/
I cant seem to get the format right. The class and age boxes are indented to the right. How can I fix this?
you can use cols to modify the number of columns of yout Table, for example 3, 6, any number you need... and tweak the labelWidth a bit : http://jsfiddle.net/sNACz/85/
I hope this helps, also note that you can play with colspans if needed too :)
TableContainer is quite flexible, as long as you do not try removing fields after it has started.
I guess in your case a cols: 2 should be enough, since you are nesting tableContainers... Play with it a bit, and do not hesitate checking the code for more possibilities (colspans etc)...