Would Like To Learn VBA

texastomass

Board Regular
Joined
Sep 2, 2008
Messages
140
Hi,

Thought this would be the best place to ask. I would like to start learning VBA script, i have a very basic knowledge but want to know more. Where would be the best startingpoint to gain this understanding and once i have this what professional qualifications would you advise i look into ?

Thanks In Advance
 
thanx geek
and thanx adam
it is really great explain
i will do my best to improve my self
and i will ask always about what i can't understand
*******************************
i have another Question a bout Formula
what is the best to understand Formula
and how i can make complex Formula like this
Code:
=TRIM(LEFT(A2,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A2&"0123456789"))-1))
****************************
=TRIM(RIGHT(A2,LEN(A2)-SEARCH(" ",A2,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A2&"0123456789")))))

i am sorry for all this Question
but i need your help
 
Upvote 0

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
A very helpful trick is using the F9 key to highlight a part of a formula, which shows you what it evaluates to. For example, if you have values 1,2,3 in A1,B1 and C1, and a formula =A1+(B1+C1), then select and highlight (B1+C1) in the formula bar, and hit F9, you will see 5, which is 2 + 3. (NOTE, hit ESCAPE to get out of this display, otherwise the conversion becomes a permanent one).

Doing the same with your "complex formula", you work inside out:

Concatenate A2 with the value "0123456789"
Code:
[COLOR="Blue"]A2&"0123456789"[/COLOR]
Find the first location of each of the values from 0 to 9 in the concatenated value above.
Code:
[COLOR="blue"]SEARCH({0,1,2,3,4,5,6,7,8,9},A2&"0123456789")[/COLOR]
Find the lowest/minimum values from the set of numbers returned above.
Code:
[COLOR="blue"]MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A2&"0123456789"))[/COLOR]
Subtract 1
Code:
[COLOR="blue"]MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A2&"0123456789"))-1[/COLOR]
Take the left characters in A2 from the first to the one at the number location above.
Code:
[COLOR="blue"]LEFT(A2,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A2&"0123456789"))-1)[/COLOR]
Remove any leading and trailing spaces
Code:
[COLOR="blue"]TRIM(LEFT(A2,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A2&"0123456789"))-1))[/COLOR]

It appears this formula would return text with any numeric values stripped off off from the right side. As you can see, it is built from a number of more or less simple formulas, to achieve a fairly sophisticated goal. Another way to "decompose" these formulas is to break each step into a separate cell. In this case, you could put the search formula in Cell B2, the Min formula in Cell C2 (referencing the result in B2), the Left formula in Cell D2 (referencing the result in C2), and the Trim formula in Cell E2 (referencing the result in D2). E2 would also be the final calculation and the answer.

Hope this helps. In my opinion, using search with set of values to create a resulting set of values is not common and the formula is quite clever - someone who knows Excel very well probably created this.
 
Upvote 0
Thanx Alexander for your advice it is very helpful
and as u said this is clever formula and a member here his name Yard
he make this formula
i hope if i can some day create formula like this formula :(
any way thanks again for all this help from
SydneyGeek
ajetrumpet
Alexander Barnes
you are really nice team
 
Upvote 0

Forum statistics

Threads
1,225,388
Messages
6,184,681
Members
453,252
Latest member
ok_lets

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top