Page 1 of 1

Any Excel Geeks around?

Posted: Thu Jul 05, 2012 7:14 pm
by andy a
Hi,

I'm trying to help someone out at work and I'm stuck.

Basically they have a spreadsheet with product codes in and need a formula telling them which account to invoice it to based on the product code.

if it contains 'NFUCOM' and doesn't end in '/M' then account is 'NFU133'
if it contains 'NFUEMP' then account is 'NFU263'
if it contains 'NFUCFE' then account is 'NFU257'
otherwise it's account "NFU001"

I thought I'd done it but failed miserably. The worksheet is attached if anyone's feeling creative it's got my formula in which only works for the 1st rule.

Re: Any Excel Geeks around?

Posted: Thu Jul 05, 2012 7:17 pm
by Joe
Wrong forum surely?

Any Excel Geeks around?

Posted: Thu Jul 05, 2012 7:17 pm
by The Ginge Reaper
Do those 6 character strings appear at the same place in each full product code?

If so there is a way of doing it using a MID and then an IF function but it's kinda messy and wouldn't be able to do it until tomorrow.

Re: Any Excel Geeks around?

Posted: Thu Jul 05, 2012 7:20 pm
by andy a
I think they could be anywhere in the product code. I tried using the find formula ....

=IF(AND(FIND("NFUCOM",G4,1)>0,(RIGHT(G4,2)<>"/M"))=TRUE,"NFU133",IF(FIND("NFUEMP",G4,1)>0,"NFU263",IF(FIND(G4,"NFUCFE",1)>1,"NFU257","NFU001")))

Any Excel Geeks around?

Posted: Thu Jul 05, 2012 7:21 pm
by The Ginge Reaper
Can't get my head round that on my phone, I'll have a look tomorrow.

Re: Any Excel Geeks around?

Posted: Thu Jul 05, 2012 7:24 pm
by andy a
Cheers - much appreciated

Any Excel Geeks around?

Posted: Thu Jul 05, 2012 7:26 pm
by The Ginge Reaper
I'm not promising anything though :)

Re: Any Excel Geeks around?

Posted: Thu Jul 05, 2012 7:27 pm
by M H
Why the fuck are you using spreadsheets for invoicing when there's far easier options out there?

I happen to know someone who can convert excel into CSV and import it into accounting systems............

Re: Any Excel Geeks around?

Posted: Thu Jul 05, 2012 7:39 pm
by D & B
Think I'll sit this one out.

Re: Any Excel Geeks around?

Posted: Thu Jul 05, 2012 7:58 pm
by andy a
M H wrote:Why the fuck are you using spreadsheets for invoicing when there's far easier options out there?

I happen to know someone who can convert excel into CSV and import it into accounting systems............

It's not for invoicing it's for product that's been paid for but the customer needs a report showing which cost centre has had it's products called off.

Re: Any Excel Geeks around?

Posted: Thu Jul 05, 2012 8:00 pm
by gazman
D & B wrote:Think I'll sit this one out.
Me too mate. Can't stand excel.

Re: Any Excel Geeks around?

Posted: Thu Jul 05, 2012 8:02 pm
by andy a
gazman wrote:
D & B wrote:Think I'll sit this one out.
Me too mate. Can't stand excel.
I'm none to fond of it myself. Unfortunatley most of the people I work with are less adept than me so I get this sort of stuff to try and sort out.

Re: Any Excel Geeks around?

Posted: Sat Jul 07, 2012 6:50 am
by andy a
Cracked it!

=IF(AND(IFERROR(FIND("NFUCOM",G12,1)>0,FALSE),(RIGHT(G12,2)<>"/M"))=TRUE,"NFU133",IF(IFERROR(FIND("NFUEMP",G12,1)>0,FALSE),"NFU263",IF(IFERROR(FIND(G12,"NFUCFE",1)>1,FALSE),"NFU257","NFU001")))

Re: Any Excel Geeks around?

Posted: Sat Jul 07, 2012 6:51 am
by M H
At 6.50 on a Saturday morning, that's sad mate!

Re: Any Excel Geeks around?

Posted: Sat Jul 07, 2012 7:01 am
by andy a
It's pretty sad any time of any day in my opinion. Don't like being beaten by technology though and it struck me whilst I was making a coffee. Fucking computers!