Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-29-2016, 07:43 AM
MKKYB MKKYB is offline If formula Windows 7 64bit If formula Office 2013
Novice
If formula
 
Join Date: Nov 2016
Posts: 3
MKKYB is on a distinguished road
Default If formula

Hi,



I will like to write a formula to return a certain value in excel.
Basically, say if C4 cell contains x,y, or z then I want D4 to find the last cell (in colum C) with x, y or z and return a value equal the corresponding D value +1

Any help at all will be appreciated. I can give more explanation if this isn't clear.

Thanks
Reply With Quote
  #2  
Old 11-29-2016, 08:56 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline If formula Windows 7 64bit If formula Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,779
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Supposing your range is C4:d14 try =INDEX(D4:d14,(MAX((C4:C14=$C$4)*ROW(4:14))-ROW(4:14)+1))

This is an array formula that should be committed with Ctrl+Shift+Enter
Attached Files
File Type: xlsx CheckMax.xlsx (9.1 KB, 8 views)
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #3  
Old 11-29-2016, 09:00 AM
gebobs gebobs is offline If formula Windows 7 64bit If formula Office 2010 64bit
Expert
 
Join Date: Mar 2014
Location: Atlanta
Posts: 837
gebobs has a spectacular aura aboutgebobs has a spectacular aura about
Default

Try this (change the ranges to suit your sheet). Of course, the brackets indicate that this is an array formula so when you enter it you need to press CNTL-SHIFT-ENTER.

{=LOOKUP(2,1/(C6:C15=C4),D6:d15)+1}
Reply With Quote
  #4  
Old 11-29-2016, 09:47 AM
xor xor is offline If formula Windows 10 If formula Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,097
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

@gebobs

Not a big deal but I don't think array entering is required.
Reply With Quote
  #5  
Old 11-29-2016, 02:08 PM
gebobs gebobs is offline If formula Windows 7 64bit If formula Office 2010 64bit
Expert
 
Join Date: Mar 2014
Location: Atlanta
Posts: 837
gebobs has a spectacular aura aboutgebobs has a spectacular aura about
Default

Quote:
Originally Posted by xor View Post
@gebobs

Not a big deal but I don't think array entering is required.
Right you are!
Reply With Quote
  #6  
Old 11-30-2016, 04:47 AM
MKKYB MKKYB is offline If formula Windows 7 64bit If formula Office 2013
Novice
If formula
 
Join Date: Nov 2016
Posts: 3
MKKYB is on a distinguished road
Default

Thanks for getting back to me, it doesn't exactly give me what I want.

I more or less need a formula to continue a numbering sequence based on the value in the adjacent cell.
If column C has values x, y or z and D contain numbering sequence based on what is in C
so say C10= x then D10 checks for the last C cell with x value (before C10) and returns the number in the D cell +1
Reply With Quote
  #7  
Old 11-30-2016, 12:25 PM
xor xor is offline If formula Windows 10 If formula Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,097
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

Is it something like the attached?
Attached Files
File Type: xlsx MKKYB.xlsx (10.3 KB, 10 views)
Reply With Quote
  #8  
Old 12-01-2016, 06:37 AM
MKKYB MKKYB is offline If formula Windows 7 64bit If formula Office 2013
Novice
If formula
 
Join Date: Nov 2016
Posts: 3
MKKYB is on a distinguished road
Default

Quote:
Originally Posted by xor View Post
Is it something like the attached?
Thanks, yes something like that. Thanks for your help
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
If formula Possible to use an existing vlookup formula to also insert correct info and trigger a SUM formula innkeeper9 Excel 2 09-13-2016 08:59 PM
If formula Formula Help yljayhawk Excel 5 07-11-2016 06:14 AM
Need help with dragging a formula and changing a reference column as I drag the formula. LupeB Excel 1 10-22-2015 03:02 PM
If formula IF + AND formula help david_89_ Excel 4 06-11-2014 11:07 AM
If formula Need help with formula zachluke Excel 3 03-13-2014 11:15 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:46 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft