Replace item AUTO if not match in invoice No

Copper Contributor

Hi All,

i am working on a sheet on two set of data bases. first is main data and second is invoice data. both are extract from different system software for analysis. main data is perfect and compare into invoice data and check all items are OK or not OK. similar i have a long invoices data where i have to compare with main data. first check invoice then match all item if there is presidency on there then replace to each other. you can see my attached file. 

i am using formula but failed. 

=IF(MATCH(A3,$F$3:$F$21,0)>0,A3,REPLACE(A3,1,11,F3))

 

Thanks.

9 Replies

@majidsiddique52075 , you can't replace the value in another cell without VBA programming, formula returns the result of the calculations into the cell where this formula is.

 

As for formula, MATCH returns #N/A error if match is not found, with that error entire formula also returns the same error. You may wrap the MATCH with IFNA or IFERROR to handle such situation.

 

REPLACE(A19,1,11,F19) takes text from A19, replaces it's first eleven characters with the text from F19 and returns result into the cell where this formula is.

Hi @Sergei Baklan 

Thank to reply.

is there any possibility to highlight mismatch item with conditional formatting? 

Thanks.

 

@majidsiddique52075 , you may apply the rule with formula

=COUNTIF($F$3:$F$21,A3)=0

Please see attached

 

@Sergei Baklan 

Thank boss, its working perfect, but i cannot apply vlookup, match or any other formula to count highlight cell. its also required for VBA coding. i really dont know VBA. 

Thanks for the reply,

Thanks

 

@majidsiddique52075 , to count them you may use

=SUMPRODUCT(--(COUNTIF($F$3:$F$21,$A$3:$A$21)=0))

or

=SUMPRODUCT(--NOT(ISNUMBER(MATCH($A$3:$A$21,$F$3:$F$21,0))))

 

@Sergei Baklan 

its working perfect. thank boss,

if i insert manually color on the cell then formula is not working. is it for conditional formatting only?

do you have any other idea to count cell highlighted when i put manually color by theme color window, ( normal cell color )?

Thanks 

 

@majidsiddique52075 , yes, it counts using practically the same formulas as for conditional formatting rule.

 

If count based on cell property, color in particular, that's VBA programming. Here are at least couple of conversations how to do that. That's not my expertise.

@Sergei Baklan 

Thanks a lot Boss,