Select last number to the far right of a row.

nparsons75

Well-known Member
Joined
Sep 23, 2013
Messages
1,254
Office Version
  1. 2016
Is there a formula that will allow me to select the far most value to the right of a row? Also, the value should only be selected if it appears under the day of the month - 1. (yesterday)

For example, in the top table below the value to the far right = 10 This will be returned in to my result cell as the value does sit under yesterdays day of the month.

In the second example the cell = blank on yesterdays day of month and therefore the result in my result cell will = 0.

I hope this makes sense.....

Book10
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAF
6Result10
7
8Day of month12345678910111213141516171819202122232425262728293031
9Value706191217372671166188103100856959210710076621210
Sheet1



Book10
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAF
14Result0
15
16Day of month12345678910111213141516171819202122232425262728293031
17Value7061912173726711661881031008569592107100766212
Sheet1
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
In your first example could you have values after the 10 in AB9 & if so should it still return 10 or should it be blank?
 
Upvote 0
In your first example could you have values after the 10 in AB9 & if so should it still return 10 or should it be blank?
Yes, as each day passes a new value is added on the corresponding day. The value to be added will always be the day after. So, to fill in the value under 27 then that will be complete today. For tomorrows value, this will be updated Wednesday. We do however have weekends and nothing will be added for the saturday or sunday until the monday.
 
Upvote 0
Ok how about
Excel Formula:
=HLOOKUP(DAY(TODAY()-1),B8:AF9,2,0)
 
Upvote 0
Ok how about
Excel Formula:
=HLOOKUP(DAY(TODAY()-1),B8:AF9,2,0)
It didnt seem to work, no result returned. One thing I should have added is that there are multiple values underneath the day number.... The values will all be different, for the purposes of this I just copy / pasted...

Also, the day number, what format does that cell have to be?



Book10
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAF
6Result10
7
8Day of month12345678910111213141516171819202122232425262728293031
9Value1706191217372671166188103100856959210710076621210
10Value2706191217372671166188103100856959210710076621210
11Value3706191217372671166188103100856959210710076621210
12Value4706191217372671166188103100856959210710076621210
Sheet1
 
Upvote 0
Is row 8 numbers or text?
 
Upvote 0
Is row 8 numbers or text?
its a formula...

Daily production tracker kpi display 2021 v3.1 MASTER.xlsm
FGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJ
30TueWedThuFriSatSunMonTueWedThuFriSatSunMonTueWedThuFriSatSunMonTueWedThuFriSatSunMonTueWedThu
311234567891011121314151617181920212223242526272829301
JUNE
Cell Formulas
RangeFormula
F30F30=E4
G30:AJ31G30=F30+1
F31F31=E4
Cells with Conditional Formatting
CellConditionCell FormatStop If True
G30:H30Cellcontains an errortextNO
AI47:AI50,AI30:AI45Expression=COUNTIF(holidays,F$30)>0textNO
K32:L32,R32:S32,R37:S38,R40:S45,R39,R33,K37:Q45,O36,Q36:R36,F30:AC31,R50:S50,R49,R47:S48,F47:Q50,Y37:AC37,Y36,AC36,Y39:AC45,Y38,AA38:AC38,T47:AC50,F46:AC46,K33:K36,Y32:AC35,R34:S35,F32:J45,M32:Q35,T32:X45,L34:L35,AD30:AJ50Expression=WEEKDAY(F$30,2)>5textNO
K32:L32,K37:L45,K47:L50,K33:K36,R32:S32,R33,R37:S38,R36,R40:S45,R39,R50:S50,R49,R47:S48,R34:S35,Y47:Z50,Y37:Z37,Y36,Y39:Z45,Y38,Y32:Z35,AA33,AA34:AB34,F30:AJ31,AE47:AJ50,AE32:AJ45Expression=F$30=$E$5textYES
K32:L32,K37:L45,K47:L50,K33:K36,R32:S32,R33,R37:S38,R36,R40:S45,R39,R50:S50,R49,R47:S48,R34:S35,Y47:Z50,Y37:Z37,Y36,Y39:Z45,Y38,Y32:Z35,AA33,AA34:AB34,F30:AJ31,AE47:AJ50,AE32:AJ45Expression=COUNTIF(holidays,F$30)>0textNO
 
Upvote 0
Can you post that again showing what you tried for the formula.
 
Upvote 0
Hi, I have tried to recreate below using my original formulas from my sheet.

Book1
BCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAG
2Product 1#N/A
3Product 2
4Product 3
5
6DayTueWedThuFriSatSunMonTueWedThuFriSatSunMonTueWedThuFriSatSunMonTueWedThuFriSatSunMonTueWedThu
7Day No1234567891011121314151617181920212223242526272829301
8Product 1706191217372671166188103100856959210710076621210
9Product 2242524178221818000141821101082121102317
10Product 3222718179152834323336834253629693429358108
Sheet1
Cell Formulas
RangeFormula
C2C2=HLOOKUP(DAY(TODAY()-1),C7:AG8,2,0)
D6:AG7D6=C6+1
C7C7=C6
 
Upvote 0
Ok, row 7 has dates & not numbers so try
Excel Formula:
=HLOOKUP(TODAY()-1,C7:AG8,2,0)
 
Upvote 0

Forum statistics

Threads
1,214,586
Messages
6,120,402
Members
448,958
Latest member
Hat4Life

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