Excel Formula Help

MBRGriffin

New Member
Joined
Nov 11, 2014
Messages
17
Hello...I have 3 formulas that I am having trouble getting to do what I want that have been in use for quite some time. Any quick assistance would be very much appreciated!

1- I am trying to get the last populated cell value in a series of non consecutive cells in a row to return. The formula I wrote below works to return the single value (which is all they have been to this point), however, now I need it to accommodate a double digit number. (Note, there will actually be about 25 cells in each row for this formula to look through)

=if(iserr(mid((ad23&aj23&ap23),len(ad23&aj23&ap23),1)),"",mid((ad23&aj23&ap23),LEN(ad23,aj23,ap23),1))

2 - I have a date field that is returning the 1/0/1900 date, which I know how to adjust in the custom cell formatting to show as blank, but I also have a formula in these cells adding 14 days or subtracting 7 days, which then it is no longer considered '0'. how can I make this show as a blank when the date value is actually '0' but my formula is making it return with +14 (b15 is where my +14 is coming from) or -7?

=if($f19="Supplier",if(t19>1,t19-7,""),"") --returns 1/7/1900
=if($j19>0,if(n19="1",0,if(n19="4",0,if(o19>p19,0,max($p19+$b$15,$Q19,R19)))),0) - returns 1/14/1900

3 - I am counting the number of times in a column that 'NIS' is returned.... but I now have instances where the NIS I am clearing in conditional formatting if it is not applicable because it is an internal document but it is still being counted. what do I need to adjust to make this work?
My count if formula is this: =countif($x$19:$x$298,"NIS)
Here Is the formula in the x column: =if($k19=0,0,if($o19=0,NS",if($n19="1","APPROVED",if($n19="2"RESUBMIT",if($n19="3","RESUBMIT",if($n9="4",INFORMATION",""))))))
and my conditional formatting in x column says this: =$I19="Internal" format as white.

Any help is very much appreciated!!!
 
Last edited:
What does didn't work mean? You have to be specific, it returned something before the last entry, it returned 0 it returned the first entry?

Here's some actual data from a spreadsheet I created with the formula and formula results. As you can see it works with Alphanumeric.


Excel 2010
ABCDEFGHIJK
81ASAX32251GED99L14X4
9L14X4
Sheet10
Cell Formulas
RangeFormula
A9=LOOKUP(2,1/(LEN(A8:L8)>0),A8:L8)
 
Upvote 0

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
I think the problem was a typo in Skywriter's second formula =LOOKUP(2,1/(LEN(AN21:BB21)>0),AN1:BB21)

I think he intended
=LOOKUP(2,1/(LEN(AN21:BB21)>0),AN21:BB21)
 
Upvote 0
I think the problem was a typo in Skywriter's second formula =LOOKUP(2,1/(LEN(AN21:BB21)>0),AN1:BB21)

I think he intended
=LOOKUP(2,1/(LEN(AN21:BB21)>0),AN21:BB21)


Good catch, thanks for posting that.
This is why I usually just select my cells with a mouse instead of typing.
 
Upvote 0
THANK YOU!!! I really appreciate you both working with me to get this figured out (especially with my lack of forum etiquette knowledge!). Hope you both have a great day!
 
Upvote 0
Shucks, once I populate all other columns with data it no longer works, which makes sense -- and if I adjust to just my specific Rev column cell references, it gives me a 'too many arguments for this function' error message, which also makes sense (=lookup(,1/LEN(ao21,au21,ba21>0)ao21,au21,ba21). Sorry, should have made that clear that all columns/cells will eventually have data in them so that is why I need to itemize the Rev column cell references specifically in the formula...so for my example it would be only cells ao21,au21, and ba21. (side note, In my actual spreadsheet I reference 20 different Rev cells in each row. )
 
Upvote 0
Shucks, once I populate all other columns with data it no longer works, which makes sense -- and if I adjust to just my specific Rev column cell references, it gives me a 'too many arguments for this function' error message, which also makes sense (=lookup(,1/LEN(ao21,au21,ba21>0)ao21,au21,ba21). Sorry, should have made that clear that all columns/cells will eventually have data in them so that is why I need to itemize the Rev column cell references specifically in the formula...so for my example it would be only cells ao21,au21, and ba21. (side note, In my actual spreadsheet I reference 20 different Rev cells in each row. )

If you have 20, 30, 40 etc. columns with data you don't need to reference them individually, reference the range.

I want columns A through Z in row 1, I don't have to use A1, B1, C1.........
I reference them by doing the following A1:Z1 and Excel looks at all those cells.
 
Upvote 0
See data below. Each different shaded blue grouping is a new submittal to a client. I want column O to always show the most current Rev being sent out (highlighted in yellow). So for row 19, we are currently at Rev B so that is what I need to return in O19. Once our next submittal goes out I will populate the next 'Received from SUPPLIER' for the date received (az19), update the Rev # of the document into BA19, and then I will need that new Rev (BA19) to update in O19 and stay populated as I fill in the other fields to the right until I populate the next Rev which would be in bh19.

[TABLE="width: 939"]
<colgroup><col width="64" style="width: 48pt;"> <col width="52" style="width: 39pt; mso-width-source: userset; mso-width-alt: 1901;"> <col width="72" style="width: 54pt; mso-width-source: userset; mso-width-alt: 2633;"> <col width="40" style="width: 30pt; mso-width-source: userset; mso-width-alt: 1462;"> <col width="72" style="width: 54pt; mso-width-source: userset; mso-width-alt: 2633;" span="2"> <col width="51" style="width: 38pt; mso-width-source: userset; mso-width-alt: 1865;"> <col width="72" style="width: 54pt; mso-width-source: userset; mso-width-alt: 2633;" span="2"> <col width="40" style="width: 30pt; mso-width-source: userset; mso-width-alt: 1462;"> <col width="72" style="width: 54pt; mso-width-source: userset; mso-width-alt: 2633;" span="2"> <col width="51" style="width: 38pt; mso-width-source: userset; mso-width-alt: 1865;"> <col width="72" style="width: 54pt; mso-width-source: userset; mso-width-alt: 2633;" span="2"> <col width="40" style="width: 30pt; mso-width-source: userset; mso-width-alt: 1462;"> <col width="72" style="width: 54pt; mso-width-source: userset; mso-width-alt: 2633;" span="2"> <col width="51" style="width: 38pt; mso-width-source: userset; mso-width-alt: 1865;"> <col width="72" style="width: 54pt; mso-width-source: userset; mso-width-alt: 2633;"> <tbody>[TR]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 52, bgcolor: transparent"]O[/TD]
[TD="width: 72, bgcolor: transparent"]AN[/TD]
[TD="width: 40, bgcolor: transparent"]AO[/TD]
[TD="width: 72, bgcolor: transparent"]AP[/TD]
[TD="width: 72, bgcolor: transparent"]AQ[/TD]
[TD="width: 51, bgcolor: transparent"]AR[/TD]
[TD="width: 72, bgcolor: transparent"]AS[/TD]
[TD="width: 72, bgcolor: transparent"]AT[/TD]
[TD="width: 40, bgcolor: transparent"]AU[/TD]
[TD="width: 72, bgcolor: transparent"]AV[/TD]
[TD="width: 72, bgcolor: transparent"]AW[/TD]
[TD="width: 51, bgcolor: transparent"]AX[/TD]
[TD="width: 72, bgcolor: transparent"]AY[/TD]
[TD="width: 72, bgcolor: transparent"]AZ[/TD]
[TD="width: 40, bgcolor: transparent"]BA[/TD]
[TD="width: 72, bgcolor: transparent"]BB[/TD]
[TD="width: 72, bgcolor: transparent"]BC[/TD]
[TD="width: 51, bgcolor: transparent"]BD[/TD]
[TD="width: 72, bgcolor: transparent"]BE[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]18[/TD]
[TD="width: 52, bgcolor: #003150"]Current
Revision
[/TD]
[TD="width: 72, bgcolor: #003150"]Received
from
SUPPLIER
[/TD]
[TD="width: 40, bgcolor: yellow"]Rev.[/TD]
[TD="width: 72, bgcolor: #003150"]Submitted
to
Customer
[/TD]
[TD="width: 72, bgcolor: #003150"]Returned
from
Customer
[/TD]
[TD="width: 51, bgcolor: #003150"]Status[/TD]
[TD="width: 72, bgcolor: #003150"]Mark-Ups
to
SUPPLIER
[/TD]
[TD="width: 72, bgcolor: #003150"]Received
from
SUPPLIER
[/TD]
[TD="width: 40, bgcolor: yellow"]Rev.[/TD]
[TD="width: 72, bgcolor: #003150"]Submitted
to
Customer
[/TD]
[TD="width: 72, bgcolor: #003150"]Returned
from
Customer
[/TD]
[TD="width: 51, bgcolor: #003150"]Status[/TD]
[TD="width: 72, bgcolor: #003150"]Mark-Ups
to
SUPPLIER
[/TD]
[TD="width: 72, bgcolor: #003150"]Received
from
SUPPLIER
[/TD]
[TD="width: 40, bgcolor: yellow"]Rev.[/TD]
[TD="width: 72, bgcolor: #003150"]Submitted
to
Customer
[/TD]
[TD="width: 72, bgcolor: #003150"]Returned
from
Customer
[/TD]
[TD="width: 51, bgcolor: #003150"]Status[/TD]
[TD="width: 72, bgcolor: #003150"]Mark-Ups
to
SUPPLIER
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]19[/TD]
[TD="width: 52, bgcolor: transparent"]B[/TD]
[TD="bgcolor: #DCE6F1"]10/30/2014[/TD]
[TD="bgcolor: yellow"]A[/TD]
[TD="bgcolor: #DCE6F1"]11/1/2014[/TD]
[TD="bgcolor: #DCE6F1"]11/5/2014[/TD]
[TD="bgcolor: #DCE6F1"]3[/TD]
[TD="bgcolor: #DCE6F1"]11/5/2014[/TD]
[TD="bgcolor: #B8CCE4"]11/9/2014[/TD]
[TD="bgcolor: yellow"]B[/TD]
[TD="bgcolor: #B8CCE4"]11/10/2014[/TD]
[TD="bgcolor: #B8CCE4"]11/12/2014[/TD]
[TD="bgcolor: #B8CCE4"]1[/TD]
[TD="bgcolor: #B8CCE4"]11/12/2014[/TD]
[TD="bgcolor: #DCE6F1"] [/TD]
[TD="bgcolor: yellow"] [/TD]
[TD="bgcolor: #DCE6F1"] [/TD]
[TD="bgcolor: #DCE6F1"] [/TD]
[TD="bgcolor: #DCE6F1"] [/TD]
[TD="bgcolor: #DCE6F1"] [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]20[/TD]
[TD="width: 52, bgcolor: transparent"]1[/TD]
[TD="bgcolor: #DCE6F1"]10/30/2014[/TD]
[TD="bgcolor: yellow"]A[/TD]
[TD="bgcolor: #DCE6F1"]11/1/2014[/TD]
[TD="bgcolor: #DCE6F1"]11/5/2014[/TD]
[TD="bgcolor: #DCE6F1"]4[/TD]
[TD="bgcolor: #DCE6F1"]11/5/2014[/TD]
[TD="bgcolor: #B8CCE4"]11/9/2014[/TD]
[TD="bgcolor: yellow"]B[/TD]
[TD="bgcolor: #B8CCE4"]11/10/2014[/TD]
[TD="bgcolor: #B8CCE4"]11/12/2014[/TD]
[TD="bgcolor: #B8CCE4"]1[/TD]
[TD="bgcolor: #B8CCE4"]11/12/2014[/TD]
[TD="bgcolor: #DCE6F1"]11/13/2014[/TD]
[TD="bgcolor: yellow"]1[/TD]
[TD="bgcolor: #DCE6F1"]11/13/2014[/TD]
[TD="bgcolor: #DCE6F1"] [/TD]
[TD="bgcolor: #DCE6F1"] [/TD]
[TD="bgcolor: #DCE6F1"] [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]21[/TD]
[TD="width: 52, bgcolor: transparent"]11[/TD]
[TD="bgcolor: #DCE6F1"]11/1/2014[/TD]
[TD="bgcolor: yellow"]10[/TD]
[TD="bgcolor: #DCE6F1"]11/2/2014[/TD]
[TD="bgcolor: #DCE6F1"]11/7/2014[/TD]
[TD="bgcolor: #DCE6F1"]2[/TD]
[TD="bgcolor: #DCE6F1"]11/7/2014[/TD]
[TD="bgcolor: #B8CCE4"]11/10/2014[/TD]
[TD="bgcolor: yellow"]11[/TD]
[TD="bgcolor: #B8CCE4"]11/10/2014[/TD]
[TD="bgcolor: #B8CCE4"] [/TD]
[TD="bgcolor: #B8CCE4"] [/TD]
[TD="bgcolor: #B8CCE4"] [/TD]
[TD="bgcolor: #DCE6F1"] [/TD]
[TD="bgcolor: yellow"] [/TD]
[TD="bgcolor: #DCE6F1"] [/TD]
[TD="bgcolor: #DCE6F1"] [/TD]
[TD="bgcolor: #DCE6F1"] [/TD]
[TD="bgcolor: #DCE6F1"] [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]22[/TD]
[TD="width: 52, bgcolor: transparent"]0[/TD]
[TD="bgcolor: #DCE6F1"]11/2/2014[/TD]
[TD="bgcolor: yellow"]0[/TD]
[TD="bgcolor: #DCE6F1"]11/2/2014[/TD]
[TD="bgcolor: #DCE6F1"]11/7/2014[/TD]
[TD="bgcolor: #DCE6F1"]1[/TD]
[TD="bgcolor: #DCE6F1"]11/7/2014[/TD]
[TD="bgcolor: #B8CCE4"] [/TD]
[TD="bgcolor: yellow"] [/TD]
[TD="bgcolor: #B8CCE4"] [/TD]
[TD="bgcolor: #B8CCE4"] [/TD]
[TD="bgcolor: #B8CCE4"] [/TD]
[TD="bgcolor: #B8CCE4"] [/TD]
[TD="bgcolor: #DCE6F1"] [/TD]
[TD="bgcolor: yellow"] [/TD]
[TD="bgcolor: #DCE6F1"] [/TD]
[TD="bgcolor: #DCE6F1"] [/TD]
[TD="bgcolor: #DCE6F1"] [/TD]
[TD="bgcolor: #DCE6F1"] [/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Try: =INDEX(AP19:BB19,MAX((MOD(COLUMN(AP19:BB19),6)=0)*(AP19:BB19<>"")*(COLUMN(AP19:BB19)-42))+1) which must be confirmed with ctrl shift enter - not just enter. Adjust ranges as needed
 
Upvote 0
West Man, THIS WORKS (!!!) in my test data but when I move to my live spreadsheet it only returns the first Rev listed. I am guessing this is due to different columns being used in my live data... My 'Current Revision' column is actually L and my 'Rev's' are from AF19:FT19. I see where the 6 counts to the next Rev cell...what is -42? is this what needs adjusted because of the formula being in column L instead of O??
 
Upvote 0
The column in which you place the formula should not matter. Yes it is the 42 that is causing the problem. 42 is the column number of the first Rev. replace 42 with column(af). Had I used Column(AP) in my formula (which is a better practice), you likely could have revised it easily.
 
Upvote 0

Forum statistics

Threads
1,223,264
Messages
6,171,081
Members
452,377
Latest member
bradfordsam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top