Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default COMPLICATED VLOOKUP

Dear All,

I have the data in following format:

Invoice # Chq # Amount Paid
1 10
2 20
3 30
1,3 987 40

I want to lookup the invoice # which has been paid thru chq and mark
"Y" in Paid column. In above example invoice # 1 and 3 has been paid
thru Chq # 987 so they should be marked "Y".

Can anybody help me?

Thnx in advance.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default COMPLICATED VLOOKUP

The simpliest approach is to put a simple equation into the paid column

for row 1
=if(counta(B1)1,"Y","N")
where column B is the Chq # column. Copy the formula down all rows in the
Paid column.

"shaqil" wrote:

Dear All,

I have the data in following format:

Invoice # Chq # Amount Paid
1 10
2 20
3 30
1,3 987 40

I want to lookup the invoice # which has been paid thru chq and mark
"Y" in Paid column. In above example invoice # 1 and 3 has been paid
thru Chq # 987 so they should be marked "Y".

Can anybody help me?

Thnx in advance.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default COMPLICATED VLOOKUP

in the paid column (assume that is D)

d2: =if(countif(A:A,"*"&A2&"*")1,"Y","N")

This assumes that your invoice numbers are unique. In otherwords if your
invoice numbers were

1
5
10
5,10

then the formula in D2 would match the 1 found in the string in 5,10 to the
first invoice number (1) which would be incorrect. This isn't a problem if
you have invoice numbers like

111
112
113
114
112,114

where one invoice number is not a subset of another invoice number.

--
Regards,
Tom Ogilvy


"shaqil" wrote:

Dear All,

I have the data in following format:

Invoice # Chq # Amount Paid
1 10
2 20
3 30
1,3 987 40

I want to lookup the invoice # which has been paid thru chq and mark
"Y" in Paid column. In above example invoice # 1 and 3 has been paid
thru Chq # 987 so they should be marked "Y".

Can anybody help me?

Thnx in advance.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default COMPLICATED VLOOKUP

Tom it should either be 0 or =1

"Tom Ogilvy" wrote:

in the paid column (assume that is D)

d2: =if(countif(A:A,"*"&A2&"*")1,"Y","N")

This assumes that your invoice numbers are unique. In otherwords if your
invoice numbers were

1
5
10
5,10

then the formula in D2 would match the 1 found in the string in 5,10 to the
first invoice number (1) which would be incorrect. This isn't a problem if
you have invoice numbers like

111
112
113
114
112,114

where one invoice number is not a subset of another invoice number.

--
Regards,
Tom Ogilvy


"shaqil" wrote:

Dear All,

I have the data in following format:

Invoice # Chq # Amount Paid
1 10
2 20
3 30
1,3 987 40

I want to lookup the invoice # which has been paid thru chq and mark
"Y" in Paid column. In above example invoice # 1 and 3 has been paid
thru Chq # 987 so they should be marked "Y".

Can anybody help me?

Thnx in advance.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default COMPLICATED VLOOKUP

It should be as I wrote it. It will count the original invoice, so it should
always be at least 1.

--
Regards,
Tom Ogilvy


"Joel" wrote:

Tom it should either be 0 or =1

"Tom Ogilvy" wrote:

in the paid column (assume that is D)

d2: =if(countif(A:A,"*"&A2&"*")1,"Y","N")

This assumes that your invoice numbers are unique. In otherwords if your
invoice numbers were

1
5
10
5,10

then the formula in D2 would match the 1 found in the string in 5,10 to the
first invoice number (1) which would be incorrect. This isn't a problem if
you have invoice numbers like

111
112
113
114
112,114

where one invoice number is not a subset of another invoice number.

--
Regards,
Tom Ogilvy


"shaqil" wrote:

Dear All,

I have the data in following format:

Invoice # Chq # Amount Paid
1 10
2 20
3 30
1,3 987 40

I want to lookup the invoice # which has been paid thru chq and mark
"Y" in Paid column. In above example invoice # 1 and 3 has been paid
thru Chq # 987 so they should be marked "Y".

Can anybody help me?

Thnx in advance.




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default COMPLICATED VLOOKUP

Tom: 1 doesn't include 1.

"Tom Ogilvy" wrote:

It should be as I wrote it. It will count the original invoice, so it should
always be at least 1.

--
Regards,
Tom Ogilvy


"Joel" wrote:

Tom it should either be 0 or =1

"Tom Ogilvy" wrote:

in the paid column (assume that is D)

d2: =if(countif(A:A,"*"&A2&"*")1,"Y","N")

This assumes that your invoice numbers are unique. In otherwords if your
invoice numbers were

1
5
10
5,10

then the formula in D2 would match the 1 found in the string in 5,10 to the
first invoice number (1) which would be incorrect. This isn't a problem if
you have invoice numbers like

111
112
113
114
112,114

where one invoice number is not a subset of another invoice number.

--
Regards,
Tom Ogilvy


"shaqil" wrote:

Dear All,

I have the data in following format:

Invoice # Chq # Amount Paid
1 10
2 20
3 30
1,3 987 40

I want to lookup the invoice # which has been paid thru chq and mark
"Y" in Paid column. In above example invoice # 1 and 3 has been paid
thru Chq # 987 so they should be marked "Y".

Can anybody help me?

Thnx in advance.


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default COMPLICATED VLOOKUP

I see the confusion Joel and also see I didn't really explain this completely
or well.

If all of column A values are stored as text values, then the formula as
written works fine. (and as I envisioned.) If the invoice numbers are
alpha or alpha numberic and stored as text or numberic and stored as text
then as in the example below

A111
A112
A113
A111, A113

then it works as written. =IF(COUNTIF(A:A,"*"&A2&"*")1,"Y","N")

If the invoice numbers are numeric and stored as numbers

111
112
113
111,113

then the invoice number itself will not be counted and you are correct that
the formula should use 0.
=IF(COUNTIF(A:A,"*"&A2&"*")0,"Y","N")

However, in this latter case, if only a single invoice is paid with a check,
then this will be problematic again if that invoice number is stored as
numeric. My advice would be to format Column A as Text and use the original
formula.

Does that clear it up. (thanks for pointing this out).

--
regards,
Tom Ogilvy





--
Regards,
Tom Ogilvy


"Joel" wrote:

Tom: 1 doesn't include 1.

"Tom Ogilvy" wrote:

It should be as I wrote it. It will count the original invoice, so it should
always be at least 1.

--
Regards,
Tom Ogilvy


"Joel" wrote:

Tom it should either be 0 or =1

"Tom Ogilvy" wrote:

in the paid column (assume that is D)

d2: =if(countif(A:A,"*"&A2&"*")1,"Y","N")

This assumes that your invoice numbers are unique. In otherwords if your
invoice numbers were

1
5
10
5,10

then the formula in D2 would match the 1 found in the string in 5,10 to the
first invoice number (1) which would be incorrect. This isn't a problem if
you have invoice numbers like

111
112
113
114
112,114

where one invoice number is not a subset of another invoice number.

--
Regards,
Tom Ogilvy


"shaqil" wrote:

Dear All,

I have the data in following format:

Invoice # Chq # Amount Paid
1 10
2 20
3 30
1,3 987 40

I want to lookup the invoice # which has been paid thru chq and mark
"Y" in Paid column. In above example invoice # 1 and 3 has been paid
thru Chq # 987 so they should be marked "Y".

Can anybody help me?

Thnx in advance.


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default COMPLICATED VLOOKUP

I don't know if the invoice column is really needed in the formula. I'm not
sure what Lookup means in original posting. Neither Tom's approach or my
approach actually performs a LOOKUP! If we are not doing a lookup then why
look at column A when just having a check number implies that the item has
been paid????? Column A has no value in the process.

"Tom Ogilvy" wrote:

I see the confusion Joel and also see I didn't really explain this completely
or well.

If all of column A values are stored as text values, then the formula as
written works fine. (and as I envisioned.) If the invoice numbers are
alpha or alpha numberic and stored as text or numberic and stored as text
then as in the example below

A111
A112
A113
A111, A113

then it works as written. =IF(COUNTIF(A:A,"*"&A2&"*")1,"Y","N")

If the invoice numbers are numeric and stored as numbers

111
112
113
111,113

then the invoice number itself will not be counted and you are correct that
the formula should use 0.
=IF(COUNTIF(A:A,"*"&A2&"*")0,"Y","N")

However, in this latter case, if only a single invoice is paid with a check,
then this will be problematic again if that invoice number is stored as
numeric. My advice would be to format Column A as Text and use the original
formula.

Does that clear it up. (thanks for pointing this out).

--
regards,
Tom Ogilvy





--
Regards,
Tom Ogilvy


"Joel" wrote:

Tom: 1 doesn't include 1.

"Tom Ogilvy" wrote:

It should be as I wrote it. It will count the original invoice, so it should
always be at least 1.

--
Regards,
Tom Ogilvy


"Joel" wrote:

Tom it should either be 0 or =1

"Tom Ogilvy" wrote:

in the paid column (assume that is D)

d2: =if(countif(A:A,"*"&A2&"*")1,"Y","N")

This assumes that your invoice numbers are unique. In otherwords if your
invoice numbers were

1
5
10
5,10

then the formula in D2 would match the 1 found in the string in 5,10 to the
first invoice number (1) which would be incorrect. This isn't a problem if
you have invoice numbers like

111
112
113
114
112,114

where one invoice number is not a subset of another invoice number.

--
Regards,
Tom Ogilvy


"shaqil" wrote:

Dear All,

I have the data in following format:

Invoice # Chq # Amount Paid
1 10
2 20
3 30
1,3 987 40

I want to lookup the invoice # which has been paid thru chq and mark
"Y" in Paid column. In above example invoice # 1 and 3 has been paid
thru Chq # 987 so they should be marked "Y".

Can anybody help me?

Thnx in advance.


  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default COMPLICATED VLOOKUP

On Oct 11, 5:34 pm, Tom Ogilvy
wrote:
I see the confusion Joel and also see I didn't really explain this completely
or well.

If all of column A values are stored as text values, then the formula as
written works fine. (and as I envisioned.) If the invoice numbers are
alpha or alpha numberic and stored as text or numberic and stored as text
then as in the example below

A111
A112
A113
A111, A113

then it works as written. =IF(COUNTIF(A:A,"*"&A2&"*")1,"Y","N")

If the invoice numbers are numeric and stored as numbers

111
112
113
111,113

then the invoice number itself will not be counted and you are correct that
the formula should use 0.
=IF(COUNTIF(A:A,"*"&A2&"*")0,"Y","N")

However, in this latter case, if only a single invoice is paid with a check,
then this will be problematic again if that invoice number is stored as
numeric. My advice would be to format Column A as Text and use the original
formula.

Does that clear it up. (thanks for pointing this out).

--
regards,
Tom Ogilvy

--
Regards,
Tom Ogilvy



"Joel" wrote:
Tom: 1 doesn't include 1.


"Tom Ogilvy" wrote:


It should be as I wrote it. It will count the original invoice, so it should
always be at least 1.


--
Regards,
Tom Ogilvy


"Joel" wrote:


Tom it should either be 0 or =1


"Tom Ogilvy" wrote:


in the paid column (assume that is D)


d2: =if(countif(A:A,"*"&A2&"*")1,"Y","N")


This assumes that your invoice numbers are unique. In otherwords if your
invoice numbers were


1
5
10
5,10


then the formula in D2 would match the 1 found in the string in 5,10 to the
first invoice number (1) which would be incorrect. This isn't a problem if
you have invoice numbers like


111
112
113
114
112,114


where one invoice number is not a subset of another invoice number.


--
Regards,
Tom Ogilvy


"shaqil" wrote:


Dear All,


I have the data in following format:


Invoice # Chq # Amount Paid
1 10
2 20
3 30
1,3 987 40


I want to lookup the invoice # which has been paid thru chq and mark
"Y" in Paid column. In above example invoice # 1 and 3 has been paid
thru Chq # 987 so they should be marked "Y".


Can anybody help me?


Thnx in advance.- Hide quoted text -


- Show quoted text -


Thanks a lot, I really want exactly as u explained.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Complicated vlookup/min-max query...please help SAM Excel Discussion (Misc queries) 6 June 27th 09 07:11 PM
a little complicated Gaurav[_2_] Excel Worksheet Functions 7 March 18th 08 12:12 AM
Need help with complicated Vlookup, or possibly other function havocdragon Excel Worksheet Functions 1 October 9th 06 08:20 AM
Complicated VLOOKUP ivory_kitten Excel Programming 0 September 12th 06 03:00 AM
Complicated Vlookup/count problem swjtx Excel Worksheet Functions 6 December 18th 05 12:05 AM


All times are GMT +1. The time now is 11:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"