+ Reply to Thread
Results 1 to 14 of 14

Edit match formula

  1. #1
    Registered User
    Join Date
    01-16-2014
    Location
    uk
    MS-Off Ver
    Excel 2013
    Posts
    99

    Edit match formula

    Hi

    I have a formula that is working great for the task in hand that would give a value if 2 criteria was matched.

    =IF(AND(N3<=3,Q3=$Q$4),5,"")
    ------------------------------------------------------

    What i now require is Q3 to match or be in range by 3 more of Q4 (but no less than Q4)

    Q3=$Q$4)

    Hope i have explained myself well enough

    Thanks for looking

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Edit match formula

    Here!

    Try this out -

    =IF(AND(N3<=3,OR(Q3=$Q$4,Q3=$Q$4+1,Q3=$Q$4+2,Q3=$Q$4+3)),5,"")

    Hope I understood you correctly.

    Deep
    Cheers!
    Deep Dave

  3. #3
    Registered User
    Join Date
    01-16-2014
    Location
    uk
    MS-Off Ver
    Excel 2013
    Posts
    99

    Re: Edit match formula

    msexcelathome

    Unfortunately that formula gives a #value! error when cells are blank, if it can be modified to not recieve error please

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Edit match formula

    Maybe:
    =IF(AND(N3<=3,ISNUMBER(MATCH(Q3,$Q$4:$Q$7,0))),5,"")
    Q3:Q7 can be both Text or Number.
    Quang PT

  5. #5
    Registered User
    Join Date
    01-16-2014
    Location
    uk
    MS-Off Ver
    Excel 2013
    Posts
    99

    Re: Edit match formula

    Hi I thought i better attach a sheet with the macro running, it will give you a better idea of what i mean.

    Thanks
    Attached Files Attached Files

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Edit match formula

    How about:
    Please Login or Register  to view this content.
    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

  7. #7
    Registered User
    Join Date
    01-16-2014
    Location
    uk
    MS-Off Ver
    Excel 2013
    Posts
    99

    Re: Edit match formula

    bebo

    just tested on attachment and seemed to do the trick i will try it on my work this evening and get back with what i get there .

    Thanks Pal

  8. #8
    Registered User
    Join Date
    01-16-2014
    Location
    uk
    MS-Off Ver
    Excel 2013
    Posts
    99

    Re: Edit match formula

    Just tried it on work and it seems that it is only taking the number into account but ignoring the text, for example: if number/text to match is 19Hy in cell A1, In C2 it matches 19Hy,20Hy,21Hy,22Hy which is great but it will also match 19Hd 19Fg 20Gh 22Zj and so on, so in other words the text must be an exact match but the number to be in range of number, another example: if (A1) states 45Gs the only possible matches in (C2) are (45Gs,46Gs,47Gs,48Gs)=true. (45St,46St,47St,48st)=false.

    Almost there so close

  9. #9
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Edit match formula

    Please try again:
    Please Login or Register  to view this content.
    Also replace "," to ";" for you:
    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    01-16-2014
    Location
    uk
    MS-Off Ver
    Excel 2013
    Posts
    99

    Re: Edit match formula

    bebo

    You are a master, i bow to you again and again, that is some monster text which is going in my note pad for later use

    I need to bog your brains again using same formula instead of making new thread if thats ok? ill explain also have added the same sheet as example.
    I require 3 other criteria included in your formula ---------> (Match Cell) (Match Cell) (Less Than Cell)by having these 5 criteria it would pin point a near enough fact to pay more attention to.

    your formula is in the sheet already just needs edit.

    Thanks again bebo for your time i really do appreciate it you Star Seed.
    Attached Files Attached Files

  11. #11
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Edit match formula

    A little confusion with : What is expected to match with E1, and F1? What is expected to be less than G1?
    What kind of data is E1, F1 (text, number, alphanumeric,...)?
    Could you pls give a few set of data , i.e A1=22Gd, C2=22Gd, D=3, E1=?, F1=?, G1=?, H2=?
    I'll be ready after few hours.

  12. #12
    Registered User
    Join Date
    01-16-2014
    Location
    uk
    MS-Off Ver
    Excel 2013
    Posts
    99

    Re: Edit match formula

    I added more info on sheet hope its better
    Attached Files Attached Files

  13. #13
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Edit match formula

    I place 3 new conditions in first AND in the formular:

    =IF(AND(EXACT($E$1,$E$2),EXACT($F$1,$F$2),$G$2<$G$1,EXACT(TRIM(SUBSTITUTE(C2,MAX(IFERROR(--MID(C2,1,ROW(INDIRECT("1:"&LEN(C2)))),"")),"")),TRIM(SUBSTITUTE(A1,MAX(IFERROR(--MID(A1,1,ROW(INDIRECT("1:"&LEN(A1)))),"")),"")))),IF(AND(D2<=3,ISNUMBER(MATCH(TRUE,MAX(IFERROR(--MID(C2,1,ROW(INDIRECT("1:"&LEN(C2)))),""))=MAX(IFERROR(--MID(A1,1,ROW(INDIRECT("1:"&LEN(A1)))),""))+{0,1,2,3},0))),5,""),"")

  14. #14
    Registered User
    Join Date
    01-16-2014
    Location
    uk
    MS-Off Ver
    Excel 2013
    Posts
    99

    Re: Edit match formula

    Thats fantastic bebo it works exactly as it should +++++++

    Thank alot for all your help

    I am going to start a new thread as i have 300 rows of this code to add and when i copy as format it does not paste part of the code to reflect the row it is in.

    (EXACT($E$1,$E$2),EXACT($F$1,$F$2),$G$2<$G$1,EXACT cells do not change when copy/paste whole column.

+ 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] Lookup/Search/Find/Match then edit in userform
    By Cuba64 in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 12-17-2013, 06:49 PM
  2. need slight edit to ISNUMBER)MATCH formula
    By tlacloche in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-26-2013, 10:01 AM
  3. VBA - match item in webpage table col A with Excel Col A n edit in Web Col B
    By navniit in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-28-2013, 11:43 AM
  4. Replies: 5
    Last Post: 02-29-2012, 08:51 PM
  5. Edit macro to match entire cell contents
    By nis75p06 in forum Excel General
    Replies: 1
    Last Post: 09-03-2005, 12:05 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