Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default VLOOKUP - Tricky problem, help please!

Hello

I have the following formula:

=IF(ISERROR(VLOOKUP($A150,'FURL Data'!$C:$G,3,FALSE)),0,(VLOOKUP
($A150,'FURL Data'!$C:$G,3,FALSE)))

This was working fine, but for some reason my source data has changed
so that the figures I need now span two separate rows, where they were
one before. So the above is no longer working as it only finds the
first row.

Is there an easy way to amend the above, so it finds both rows and
adds them together?

Would be grateful for any assistance!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default VLOOKUP - Tricky problem, help please!

=match() will return the row of the first match:

=match($a150,'furl data'!$c:$c,0)
will be the number of the row with that match.

If you wanted to bring back information from that row, you could use:

=index('furl data'!$e:$e,match($a150,'furl data'!$c:$c,0))

So you could add a number (or subtract) to offset from that first row's match:

=index('furl data'!$e:$e,1+match($a150,'furl data'!$c:$c,0))

You may want the same check to see if there is a match:

=if(isna(match($a150,'furl data'!$c:$c,0)),0,....

Debra Dalgleish has lots of notes:
http://www.contextures.com/xlFunctions02.html (for =vlookup())
and
http://www.contextures.com/xlFunctions03.html (for =index(match()))
and
http://contextures.com/xlFunctions02.html#Trouble

David wrote:

Hello

I have the following formula:

=IF(ISERROR(VLOOKUP($A150,'FURL Data'!$C:$G,3,FALSE)),0,(VLOOKUP
($A150,'FURL Data'!$C:$G,3,FALSE)))

This was working fine, but for some reason my source data has changed
so that the figures I need now span two separate rows, where they were
one before. So the above is no longer working as it only finds the
first row.

Is there an easy way to amend the above, so it finds both rows and
adds them together?

Would be grateful for any assistance!


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default VLOOKUP - Tricky problem, help please!

Hi Dave,

I tried to solve David problem, and I thought that

=SUM(OFFSET(INDIRECT(ADDRESS(MATCH($A150,'Furl
Data'!C:C,0),5,4,1,"Munka1")),0,0,2,1))

should work but it doesn't. I couldn't figure out why. Could you explain me
the reason, please!

Regards,
Stefi

Dave Peterson ezt *rta:

=match() will return the row of the first match:

=match($a150,'furl data'!$c:$c,0)
will be the number of the row with that match.

If you wanted to bring back information from that row, you could use:

=index('furl data'!$e:$e,match($a150,'furl data'!$c:$c,0))

So you could add a number (or subtract) to offset from that first row's match:

=index('furl data'!$e:$e,1+match($a150,'furl data'!$c:$c,0))

You may want the same check to see if there is a match:

=if(isna(match($a150,'furl data'!$c:$c,0)),0,....

Debra Dalgleish has lots of notes:
http://www.contextures.com/xlFunctions02.html (for =vlookup())
and
http://www.contextures.com/xlFunctions03.html (for =index(match()))
and
http://contextures.com/xlFunctions02.html#Trouble

David wrote:

Hello

I have the following formula:

=IF(ISERROR(VLOOKUP($A150,'FURL Data'!$C:$G,3,FALSE)),0,(VLOOKUP
($A150,'FURL Data'!$C:$G,3,FALSE)))

This was working fine, but for some reason my source data has changed
so that the figures I need now span two separate rows, where they were
one before. So the above is no longer working as it only finds the
first row.

Is there an easy way to amend the above, so it finds both rows and
adds them together?

Would be grateful for any assistance!


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default VLOOKUP - Tricky problem, help please!

Maybe it's as simple as changing your "munka1" test worksheet to "furl data"????

After that it worked ok for me--if there was a match.

Stefi wrote:

Hi Dave,

I tried to solve David problem, and I thought that

=SUM(OFFSET(INDIRECT(ADDRESS(MATCH($A150,'Furl
Data'!C:C,0),5,4,1,"Munka1")),0,0,2,1))

should work but it doesn't. I couldn't figure out why. Could you explain me
the reason, please!

Regards,
Stefi

Dave Peterson ezt *rta:

=match() will return the row of the first match:

=match($a150,'furl data'!$c:$c,0)
will be the number of the row with that match.

If you wanted to bring back information from that row, you could use:

=index('furl data'!$e:$e,match($a150,'furl data'!$c:$c,0))

So you could add a number (or subtract) to offset from that first row's match:

=index('furl data'!$e:$e,1+match($a150,'furl data'!$c:$c,0))

You may want the same check to see if there is a match:

=if(isna(match($a150,'furl data'!$c:$c,0)),0,....

Debra Dalgleish has lots of notes:
http://www.contextures.com/xlFunctions02.html (for =vlookup())
and
http://www.contextures.com/xlFunctions03.html (for =index(match()))
and
http://contextures.com/xlFunctions02.html#Trouble

David wrote:

Hello

I have the following formula:

=IF(ISERROR(VLOOKUP($A150,'FURL Data'!$C:$G,3,FALSE)),0,(VLOOKUP
($A150,'FURL Data'!$C:$G,3,FALSE)))

This was working fine, but for some reason my source data has changed
so that the figures I need now span two separate rows, where they were
one before. So the above is no longer working as it only finds the
first row.

Is there an easy way to amend the above, so it finds both rows and
adds them together?

Would be grateful for any assistance!


--

Dave Peterson


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default VLOOKUP - Tricky problem, help please!

Sorry Dave for disturbing you with such a silly error of mine! That was as
simple!
Thanks,
Stefi


Dave Peterson ezt *rta:

Maybe it's as simple as changing your "munka1" test worksheet to "furl data"????

After that it worked ok for me--if there was a match.

Stefi wrote:

Hi Dave,

I tried to solve David problem, and I thought that

=SUM(OFFSET(INDIRECT(ADDRESS(MATCH($A150,'Furl
Data'!C:C,0),5,4,1,"Munka1")),0,0,2,1))

should work but it doesn't. I couldn't figure out why. Could you explain me
the reason, please!

Regards,
Stefi

âžDave Peterson❠ezt Ã*rta:

=match() will return the row of the first match:

=match($a150,'furl data'!$c:$c,0)
will be the number of the row with that match.

If you wanted to bring back information from that row, you could use:

=index('furl data'!$e:$e,match($a150,'furl data'!$c:$c,0))

So you could add a number (or subtract) to offset from that first row's match:

=index('furl data'!$e:$e,1+match($a150,'furl data'!$c:$c,0))

You may want the same check to see if there is a match:

=if(isna(match($a150,'furl data'!$c:$c,0)),0,....

Debra Dalgleish has lots of notes:
http://www.contextures.com/xlFunctions02.html (for =vlookup())
and
http://www.contextures.com/xlFunctions03.html (for =index(match()))
and
http://contextures.com/xlFunctions02.html#Trouble

David wrote:

Hello

I have the following formula:

=IF(ISERROR(VLOOKUP($A150,'FURL Data'!$C:$G,3,FALSE)),0,(VLOOKUP
($A150,'FURL Data'!$C:$G,3,FALSE)))

This was working fine, but for some reason my source data has changed
so that the figures I need now span two separate rows, where they were
one before. So the above is no longer working as it only finds the
first row.

Is there an easy way to amend the above, so it finds both rows and
adds them together?

Would be grateful for any assistance!

--

Dave Peterson


--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default VLOOKUP - Tricky problem, help please!

Thanks everyone!
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default VLOOKUP - Tricky problem, help please!

Mostly to Dave!
You are welcome! Thanks for the feedback!
Stefi

David ezt *rta:

Thanks everyone!

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
Tricky lookup problem dksaluki Excel Discussion (Misc queries) 4 November 27th 08 05:46 PM
tricky sum problem Dave F Excel Discussion (Misc queries) 6 October 17th 06 01:35 PM
Tricky array problem. MarkCCB Excel Discussion (Misc queries) 3 August 6th 06 11:04 AM
Tricky Excel Problem Steve Smallman Excel Programming 2 August 13th 03 03:34 PM
Tricky Excel Problem J P Singh Excel Programming 1 August 12th 03 07:14 PM


All times are GMT +1. The time now is 11:26 PM.

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"