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
 
Ok great that seems to have got it....I have the result 10 now showing in C2. How would I replicate for C3 and C4?
 
Upvote 0

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
In C2 dragged down
Excel Formula:
=HLOOKUP(TODAY()-1,$C$7:$AG$10,MATCH(B2,$B$7:$B$10,0),0)
 
Upvote 0
Sorry im not sure how you mean. Do I replace the existing formula with this =HLOOKUP(TODAY()-1,$C$7:$AG$10,MATCH(B2,$B$7:$B$10,0),0) then drag down?
 
Upvote 0
Ok I must be doing something wrong, it worked but returns the same result as the top cell product 1?
 
Upvote 0
Not for me it doesn't
+Fluff 1.xlsm
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAG
1
2Product 110
3Product 20
4Product 36
5
6ResultDay44348443494435044351443524435344354443554435644357443584435944360443614436244363443644436544366443674436844369443704437144372443734437444375443764437744378
7Day No44348443494435044351443524435344354443554435644357443584435944360443614436244363443644436544366443674436844369443704437144372443734437444375443764437744378
8Day of monthProduct 1706191217372671166188103100856959210710076621210
9ValueProduct 2242524178221818000141821101082121102317
10Product 322181791528343233368342536296934293581086
11
Main
Cell Formulas
RangeFormula
C2:C4C2=HLOOKUP(TODAY()-1,$C$7:$AG$10,MATCH(B2,$B$7:$B$10,0),0)
D6:AG7D6=C6+1
C7C7=C6


Do you have different products on each row?
 
Upvote 0
Solution
That is very strange

Book1
BCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAG
2Product 110
3Product 210
4Product 310
5
6DayTueWedThuFriSatSunMonTueWedThuFriSatSunMonTueWedThuFriSatSunMonTueWedThuFriSatSunMonTueWedThu
7Day No1234567891011121314151617181920212223242526272829301
8Product 1706191217372671166188103100856959210710076621210
9Product 2242524178221818000141821101082121102317
10Product 3222718179152834323336834253629693429358108
Sheet1
Cell Formulas
RangeFormula
C2:C4C2=HLOOKUP(TODAY()-1,$C$7:$AG$10,MATCH(B2,$B$7:$B$10,0),0)
D6:AG7D6=C6+1
C7C7=C6
 
Upvote 0
Yes different products, this is just a sample of my document, my full spreadsheet has a lot more products (actually processes) I have tried to simplify to demonstrate how its working.
 
Upvote 0
Do you have calculation set to automatic or manual?
 
Upvote 0
Ok I had it on manual....changed to auto and now it works....Thank you. Now, in my main file which I didnt share on here I need to replicate the fix. I have issues with it as it is slightly different but didn't want to share publicly.

I just need to figure out how it works, do the product names need to match exactly, is that what it is looking for?
 
Upvote 0

Forum statistics

Threads
1,216,029
Messages
6,128,404
Members
449,448
Latest member
Andrew Slatter

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