Advice needed

Mozelle

New Member
Joined
Mar 6, 2020
Messages
5
Office Version
  1. 365
Platform
  1. Windows
I have been asked to write a macro for the attached spreadsheet. This counts the number of days each project remains in a certain status. For it to calculate the days a date
has to be inserted into the column immediately to the right of the column containing a date or a formula that would search for the next occupied cell in the row. So in the first row of this example the macro would need to search the row for the last cell with a blank cell (BB) to its right and then find the first cell in the row with a date (BE) and move it back to the first empty cell right of BC. Searching for best method to perform such a task. Spent all day yesterday reading but still unsure how to approach. Any guidance appreciated!
 

Attachments

  • Annotation 2020-03-19 090208.png
    Annotation 2020-03-19 090208.png
    25.2 KB · Views: 26

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
I can probably help you out, but, i don't completely understand what you are trying to do yet. Please elaborate a little more.
 
Upvote 0
If you have this:
Dante Amor
AZBABBBCBDBEBFBGBHBIBJ
1Assigned Date2Working Date2Validate Date2Review Date2Days
223/10/201924/10/201930/10/20191
309/01/202014/01/202014/01/20205
Sheet


The result after the macro would be this:
Dante Amor
AZBABBBCBDBEBFBGBHBIBJ
1Assigned Date2Working Date2Validate Date2Review Date2Days
223/10/201924/10/201930/10/20191
309/01/202014/01/202014/01/20205
Sheet
 
Upvote 0
I can probably help you out, but, i don't completely understand what you are trying to do yet. Please elaborate a little more.

If the row has no date in a column following a column with a date then the date from the next column with a date needs to be moved to the left.
So on this example all of the fields that are greyed out need to be filled with the date in the next occupied column. I filled in the example on the right manually but I need to create a macro that will loop through the rows and copy and paste the dates. I'm sorry I can't explain it more clearly. Hoping the two examples help. If there was no date to the right then I used the =today() to fill in a date.


1584966293306.png
1584966670100.png
 
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,334
Members
449,077
Latest member
Jocksteriom

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