+ Reply to Thread
Results 1 to 20 of 20

Convert excel formula to vba, need help???

  1. #1
    Forum Contributor
    Join Date
    01-22-2013
    Location
    Pekanbaru, Indonesia
    MS-Off Ver
    Excel 2013 & Google Sheet
    Posts
    1,146

    Convert excel formula to vba, need help???

    hii all,

    please give me, code macro to my formula this below :

    =+IFERROR(INDEX(data!$D$2:$F$43;MATCH(1;--(data!$C$2:$C$43=$B2);0);SMALL(IF(data!$D$2:$F$43<>"";IF(data!$C$2:$C$43=$B2;COLUMN(data!$D$1:$F$1)-COLUMN(data!$D$1)+1));COUNTIF(B$2:B2;B2)));"")

    for everyone, thanks you very much...

  2. #2
    Valued Forum Contributor
    Join Date
    09-04-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    463

    Re: Convert excel formula to vba, need help???

    i think if you will raise your original query what is your need.....then we can help you easly as compare to change formula in vba code......

    so what is your need in your sheet....tell us and provide us a sample sheet if possible.....


    Regards
    CA Mahaveer Somani

  3. #3
    Forum Contributor
    Join Date
    01-22-2013
    Location
    Pekanbaru, Indonesia
    MS-Off Ver
    Excel 2013 & Google Sheet
    Posts
    1,146

    Re: Convert excel formula to vba, need help???

    i attach my workbook..mahaveersomani..
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Convert excel formula to vba, need help???

    In all your formula you have ";", instead of comma(,). I do not know how formula works with semi-colon..

  5. #5
    Forum Contributor
    Join Date
    01-22-2013
    Location
    Pekanbaru, Indonesia
    MS-Off Ver
    Excel 2013 & Google Sheet
    Posts
    1,146

    Re: Convert excel formula to vba, need help???

    Correct it, ";" as instead "," (comma)

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Convert excel formula to vba, need help???

    Quote Originally Posted by AB33 View Post
    In all your formula you have ";", instead of comma(,). I do not know how formula works with semi-colon..
    It's depant on the local settings.

    We also in Greece use semi colons as separators. Not comma!!
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  7. #7
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Convert excel formula to vba, need help???

    Fortis,
    Interesting!
    Does it only apply to comma and semi-colon, or you could change any settings?
    I am aware many Europeans countries use comma, instead of dot(Full-stop) in numbers, but not come across with formulas.

  8. #8
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Convert excel formula to vba, need help???

    Sorry!
    My local setting must be comma, not semi-colon, so I can not test your formula.
    Fortis may be able to help.

  9. #9
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Convert excel formula to vba, need help???

    Quote Originally Posted by AB33 View Post
    Fortis,
    Interesting!
    Does it only apply to comma and semi-colon, or you could change any settings?
    I am aware many Europeans countries use comma, instead of dot(Full-stop) in numbers, but not come across with formulas.
    It's also when we use format for dates.. For example the " mmm" format i have to change to "μμμ" that means Months in my local setting.. And also as about this comment of you:

    .
    .Sorry!
    My local setting must be comma, not semi-colon, so I can not test your formula.
    Fortis may be able to help.
    I f i was thinking like you did then i had to reply almost in no thread.. When OP upload no sample workbook i have to replace ALL comma to his formula to semi colons if i want(and i do many times a day) to test the formula and try to help him.

    ALSO: My name is Fotis. Not Fortis

  10. #10
    Forum Contributor
    Join Date
    01-22-2013
    Location
    Pekanbaru, Indonesia
    MS-Off Ver
    Excel 2013 & Google Sheet
    Posts
    1,146

    Re: Convert excel formula to vba, need help???

    no problem, may be you can do it with your setting "comma", and i try to convert semi-colon...

  11. #11
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Convert excel formula to vba, need help???

    ALSO: My name is Fotis. Not Fortis
    Sorrrrrrrrrrrrrrrrry!
    I have always refer by the name of "Fortis", not "Fotis". I really do not how I got it. It was probably easy to remember the English word "Fortis". I bet you I am not the only who misspell you name and will not be the last one.

  12. #12
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Convert excel formula to vba, need help???

    Some time ago i was asking you if you have fat fingers..(R, T in the keyboard) ! Do you remember?

  13. #13
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Convert excel formula to vba, need help???

    Yes, my memory still good!

    The thread was regarding sheet names.

    Looking back, I see what you meant, but I have to admit that I did not understand at that time. You have a taste for sense of humour.

  14. #14
    Valued Forum Contributor
    Join Date
    09-04-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    463

    Re: Convert excel formula to vba, need help???

    i have two little confusion in your example

    1. what is the sense of no. and how you got it.
    2. IN your answer What ever you write for Maria is it right or wrong? I think this is wrong..it should be Item 2 Item 2 Item 3 instead of Item 2 item 3 item 4 as per your question.

    Tell me both the issue so that i can make a vba for you....

    Regards
    CA Mahaveer Somani
    9785216211

  15. #15
    Forum Contributor
    Join Date
    01-22-2013
    Location
    Pekanbaru, Indonesia
    MS-Off Ver
    Excel 2013 & Google Sheet
    Posts
    1,146

    Re: Convert excel formula to vba, need help???

    thanks for your kindness, CA Mahaveer Somani

    you are correct...for Maria is it wrong, should be item2,item2 and item3 instead of item..
    then, my expected result in "sheet2" start from column c row 2 (c2) drop down, and with sheet "data" as data..

    i do believe you can help me with your "touch"..

    i attach new workbook..

    thanks again...

  16. #16
    Forum Contributor
    Join Date
    01-22-2013
    Location
    Pekanbaru, Indonesia
    MS-Off Ver
    Excel 2013 & Google Sheet
    Posts
    1,146

    Re: Convert excel formula to vba, need help???

    this, my workbook....
    Attached Files Attached Files

  17. #17
    Forum Contributor
    Join Date
    01-22-2013
    Location
    Pekanbaru, Indonesia
    MS-Off Ver
    Excel 2013 & Google Sheet
    Posts
    1,146

    Re: Convert excel formula to vba, need help???

    sorry, my file is drop behind
    Attached Files Attached Files

  18. #18
    Valued Forum Contributor
    Join Date
    09-04-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    463

    Re: Convert excel formula to vba, need help???

    hi Jhon Mustofa,

    Now i understand your query so i will make a vba code for you upto 6PM due to busy at my office..

    but still i have a confusion as i asked from you...what is the meaning of No. in your sheet2 how you get that value like
    0
    2
    2
    2
    0
    0
    0
    2
    2
    2
    0
    2
    2
    2


    Regards
    CA Mahaveer Somani
    9785216211

  19. #19
    Valued Forum Contributor
    Join Date
    09-04-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    463

    Re: Convert excel formula to vba, need help???

    Please check the attached file and see the sheet2 it is blank now press the CTRL+SHIFT+T. and see what ever you were need......


    I hope it was useful to you so please dont forget to hit * button for user reputation...

    If you have any further query then feel free to ask me......

    Regards
    CA Mahaveer Somani
    9785216211
    Attached Files Attached Files

  20. #20
    Forum Contributor
    Join Date
    01-22-2013
    Location
    Pekanbaru, Indonesia
    MS-Off Ver
    Excel 2013 & Google Sheet
    Posts
    1,146

    Re: Convert excel formula to vba, need help???

    brilliant answer..it's 100% worked perfectly.......

    thanks you, CA Mahaveer Somani

    regards,
    jhon Mustofa

  21. #21
    Valued Forum Contributor
    Join Date
    09-04-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    463

    Re: Convert excel formula to vba, need help???

    welcome dear Jhon,

    nice to see you happy.
    See you nex time dear.
    Enjoy with your file.

    Regards
    CA Mahaveer Somani
    9785216211

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Convert formula fra excel to VBA
    By Stroem in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-04-2013, 05:57 AM
  2. Replies: 5
    Last Post: 04-12-2011, 11:12 PM
  3. convert lotus formula to excel formula
    By Traymond in forum Excel General
    Replies: 2
    Last Post: 11-19-2010, 02:03 PM
  4. Replies: 3
    Last Post: 05-18-2010, 06:14 AM
  5. Convert Excel Formula to VBA
    By John V in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-31-2005, 03:10 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1