# Macro to adjust cell content accoding to cell value



## Lux Aeterna (Nov 22, 2022)

Hello again!!

I was wondering if you could write a macro for me that adjusts cell calue as follows; I enter data in column H, from H5 to H10033. Please note that if I have to edit the cell value at a later stage, I'd like the macro to leave the new value as is.

Thank you in advance!


*If cell value is**Format (column H)**Result example*datedd/mm/yy _or _dd/mm/yyyyy (e.g. 15/12/21 _or _15/12/2021)Adjust to dd/mm/yyyy format (i.e. 15/12/2021)dd/mm (e.g. 15/12)This year's date (i.e. 15/12/2022) - no auto-update when year changes!mm/yyyy (e.g. 8/2018)August 2018number1 (just for number 1)Προ 1 έτους2 to 40Προ {cell H} ετών (i.e. Προ 22 ετών)41 to 99Προ {cell H value - cell D value in the same row} ετών. (i.e. If D5 is 20 and H5 is 41, Προ 21 ετών)
Please note that;
- cell D is calculated through a function and it might be empty. In that case, I'd like the macro to adjust the content in cell H when cell D is filled.
- cell D value might be altered at a later stage. In that case, I'd like the macro to update the content in cell H.text or any other type of dataLeave as is


----------



## Lux Aeterna (Dec 2, 2022)

Up 

If a macro is not possible, a formula would work too!


----------



## Lux Aeterna (Dec 14, 2022)

Just a reminder in case someone can help!


----------



## Lux Aeterna (Dec 21, 2022)

Up! 🤞

Merry Christmas and a happy New Year everyone!


----------



## Lux Aeterna (Dec 29, 2022)

Desperate reminder 
🙏


----------

