Assistance setting up a "last row" macro

londa_vba

Board Regular
Joined
May 11, 2023
Messages
61
Office Version
  1. 365
Platform
  1. Windows
Hello
I found a formula that correctly identifies my last row with value results. I used the record macro feature to convert it to vba code. Now I need help piecing it together.
I am trying to identify the last row with value results and then add the text "AL" to the cell directly beneath it.

the formula that worked for me is =LOOKUP(2,1/((C:C)<>""),ROW(C:C))
when converted to vba, I got
VBA Code:
Formula2R1C1 = "=LOOKUP(2,1/((C[-3])<>""""),ROW(C[-3]))"

That's as far as I have been able to take myself...
 
If I needed to take this code one step further and have the value = to "AL" PLUS the value in the cell two columns to the left (column A) of whatever that last row is. How would I achieve that?
I don't understand what you are asking.
Please show me an example of your data and exactly what you are trying to do.
 
Upvote 0

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
I don't understand what you are asking.
Please show me an example of your data and exactly what you are trying to do.
I had to change the data in order to share with you. I changed "AL" to "Ladder" since are first conversation.
Short story: I need to put "Ladder_" + value of cell A4 which is "C6" in the screen shot example. See yellow cells for reference

Long story: Ladders automatically go in odd A cells such as A1, A3, A5 etc for every list imported.
However there has to be a minimum of two Ladders per list so for small lists the first ladder still goes in an odd A cell but the second will just go at the end of the list. Hence why I originally asked for vba help. But I need to identify each ladder by referencing the value in column A which will vary according to the length of the list but will always be the value in column A of whatever the last row is.

I'm sure that was clear as mud :(
 

Attachments

  • Excelboardhelp.PNG
    Excelboardhelp.PNG
    51.5 KB · Views: 4
Upvote 0
I'm sure that was clear as mud
Yeah, I think I am more confused now then before!
Your description does not seem to match up with the sample data you posted, i.e.
Short story: I need to put "Ladder_" + value of cell A4 which is "C6" in the screen shot example. See yellow cells for reference
I am not seeing that in your example at all!

In any event, this seems very different than your original question, which was already answered.
As such, it would be best to post it to a brand new thread so it shows up as an unanswered question on the "Unanswered threads" listing that many people use to look for new questions to answer.
 

Attachments

  • 1697050472020.png
    1697050472020.png
    75.3 KB · Views: 0
Upvote 0
Yeah, I think I am more confused now then before!
Your description does not seem to match up with the sample data you posted, i.e.

I am not seeing that in your example at all!

In any event, this seems very different than your original question, which was already answered.
As such, it would be best to post it to a brand new thread so it shows up as an unanswered question on the "Unanswered threads" listing that many people use to look for new questions to answer.
Ok thank you anyways
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,952
Members
449,095
Latest member
nmaske

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