Results 1 to 3 of 3

Thread: [RESOLVED] Fomula choices?

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Resolved [RESOLVED] Fomula choices?

    is there any advantage between these 2 formula? both seem to return the correct result

    =INDIRECT(ADDRESS(MATCH("tes",INDIRECT(ADDRESS(1,1,1,TRUE,CONCATENATE(D2," ", E2))):INDIRECT(ADDRESS(99,1,1,TRUE,CONCATENATE(D2," ", E2))),0),3,1,,CONCATENATE(D2," ",E2)))

    or

    =VLOOKUP("tes",INDIRECT(ADDRESS(2,1,1,TRUE,CONCATENATE(D2," ", E2))):INDIRECT(ADDRESS(99,5,1,TRUE,CONCATENATE(D2," ", E2))),3,FALSE)


    any simpler or better solution also welcome
    these are not the finished result, just some testing for a sheet i need to do, where values are on several different sheets

    seen posted as text here, the second looks like it would have less calls??
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  2. #2
    PowerPoster
    Join Date
    Oct 2010
    Posts
    2,141

    Re: Fomula choices?

    Perhaps,

    Code:
    =VLOOKUP("tes",INDIRECT(CONCATENATE("'",D2," ",E2,"'!$A$1:$E$99")),3,FALSE)

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Fomula choices?

    yes that is simpler, just put the whole range as a string

    thnx
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

Posting Permissions

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



Click Here to Expand Forum to Full Width