Formula returning #VALUE! help

cmajor335

New Member
Joined
Dec 31, 2015
Messages
5
Hello all, apologies for the long post but it was difficult to describe.
I have three columns, "B", "C" and "N". Both B & N columns contain mileage, "B3" is the start mileage and "N" the end mileage in each cell "3" to "33" for a day of the month.
Cell value "B3" = 19837.
Each Cell in COL "N" has the end mileage for the date, but until the month ends the following days replicate the last date's end mileage. E.G. if "N7" = 19842, all following cells "N8:N33" will also show 19842.
Column "C" is a column where data is entered manually, as using Column "B" doesn't work as it contains a formula.
In B2 the current formula = N33 - B3 will give me the total daily mileage.
"B3" equals 1st of the month and row 7 equals 4th of the month, going down to row 33. I can replicate the following cells in Row "N" with the last data from Row "N7" but thinks it spoils the spreadsheet.
To find the last "N" row with data I have another cell S2 with the formula =MATCH(TRUE,ISBLANK(C3:C34),0)+1. I couldn't combine this in a formula for "B2".
My Formula in cell "B2" is =("N"&S2)-B3 this returns #VALUE! yet when I highlight "N"&S2 in cell "B2" it returns me "N7".
The formula N7-B3 returns '5'which is the answer I should have in "B2".
 

Attachments

  • Screenshot 2024-12-04 at 17.28.52.png
    Screenshot 2024-12-04 at 17.28.52.png
    95.9 KB · Views: 10
The formula I gave will give last number as you mentioned.
Last text =LOOKUP("zzz",N:N) where the "zzz" needs to be anything "larger alphabetically" than any text found in the range.
Last either I would not use an entire column but something like =LOOKUP(2,1/(1-ISBLANK(N1:N1000)),N1:N1000)
 
Upvote 0

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

Forum statistics

Threads
1,225,352
Messages
6,184,454
Members
453,233
Latest member
bgmb

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