excel - Comparing 3 cells to a 4th cell. 4th cell has random number of spaces between arguments -


sorry if lengthy want clear possible. here example easier understand, lay out details, explain do.

a picture of example at: imgur.com/9uk9so9

i couldn't post picture because of <10 rep :/

column a- "name" portion of must 12 characters , "number" portion must 5 (not including '.'). so, cell a1 "adam2_______25.000". name="adam2_______" number="25.000"

column b-just name portion without spaces. so, cell b2 "adam2"

column c-same column b may different (the reason i'm doing comparison)

column d-the number portion without trailing 0's. so, cell d2 "25"

column e want comparison output along lines of true or false.

i know columns c , d correct, not sure if , b though. want compare column values in column c , d not know how account random number of spaces in between name , number portion in column a. want make sure column b matches column c should pretty easy once first part done.

basically, how account varying number of spaces/trailing 0s in comparison?

mostly i've been using conditional if/and statements. tried using concatenate function didn't seem work hoping.

thanks!

^^edit 1

in column e tried =if(a2 = (b2+d2),true(),false()) not work. gives #value! error.

i tried splitting column 2 more columns using text columns. got rid of trailing 0s , space(s) after end of "name" part. here think should pretty easy basic if statements.

what want string-searching functions - either find [case sensitive] or search [not case sensitive]. these functions @ given string, , check see whether search term within string. if present, gives character number match starts; if not present, gives error.

so see if a2 contains term in b2 term in d2, use:

=if(and(isnumber(search(b2,a2)),isnumber(search(d2,a2))),"both terms present", "at least 1 term not present") 

note doesn't compare column c @ - can't tell whether trying compare 1 not.


Comments