Macros help
Solved/Closed
Related:
- Macros help
- Macros in excel download free - Download - Spreadsheets
- Excel online macros - Guide
- Unlock excel vba and excel macros - Guide
- Enable macros in excel 365 - Guide
- How to create a calculator in excel using macros - Guide
4 responses
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
May 3, 2011 at 07:28 AM
May 3, 2011 at 07:28 AM
park this in N1 to O10
0 zero
1 one
2 two
3 three
4 four
5 five
6 six
7 seveb
8 eight
9 nine
enter 055555 in A1
your 055555 should be entered as single apostrophe(') and this 055555 otherwise it will be entered as 55555
then run this macro and see B1
0 zero
1 one
2 two
3 three
4 four
5 five
6 six
7 seveb
8 eight
9 nine
enter 055555 in A1
your 055555 should be entered as single apostrophe(') and this 055555 otherwise it will be entered as 55555
then run this macro and see B1
Sub test() Dim r As Range Dim x As String, j As Integer, y As String, cfind As Range Set r = Range("A1") j = 1 y = "" Do x = Mid(r, j, 1) Set cfind = Range("N1:N10").Cells.Find(what:=x, lookat:=xlWhole) y = y & cfind.Offset(0, 1) j = j + 1 If j > Len(r) Then Exit Do Loop 'MsgBox y r.Offset(0, 1) = y End Sub
hi
this is interesting.....but when I used it in the excel 2007 , it is giving a runtime error "91" . It says that object was not created for the variable " y " to refer...can u pls sort it out? thanks suryam
this is interesting.....but when I used it in the excel 2007 , it is giving a runtime error "91" . It says that object was not created for the variable " y " to refer...can u pls sort it out? thanks suryam
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
May 4, 2011 at 11:03 PM
May 4, 2011 at 11:03 PM
It works for me in excel 2007.
I wonder what could be the mistake
have you correctly copied in columns N and O from row 1 down
have you correctly entered '055555 (that is with an apostrophe in the beginning)
you can see it in my file.
download the file "suryam.xlsm" from this url
http://www.speedyshare.com/files/28301356/suryam.xlsm
see B1 (the macro is embedded in vb editor). this file is excel 2007 macro enabled workbook.
I wonder what could be the mistake
have you correctly copied in columns N and O from row 1 down
have you correctly entered '055555 (that is with an apostrophe in the beginning)
you can see it in my file.
download the file "suryam.xlsm" from this url
http://www.speedyshare.com/files/28301356/suryam.xlsm
see B1 (the macro is embedded in vb editor). this file is excel 2007 macro enabled workbook.