Forum Discussion
Automatically inserting a row based upon a filter
It can be done automatically, but it requires VBA so users would have to allow macros when they open the workbook.
Could you explain in more specific detail what you want?
Could you attach a small sample workbook demonstrating the problem (without sensitive data), or if that is not possible, make it available through OneDrive, Google Drive, Dropbox or similar?
- tryingtomakethingssimMar 15, 2023Copper Contributor
Thank you for your reply, sorry for the delays - the system reckoned I was posting too many lots messages (yet this is my only one!?) and so blocked me for hours.
I am hoping this works.
So the raw data appears like this:
I have labelled the 6th column with extra line needed.
If any of the cells in column 6 have "yes" selected instead of "no", it is those I want a new to appear below.
This is what I would like it to look like if yes were selected - I have made the text red so it is clear which have changed, but it is the row numbered 4 on the spreadsheet and also (now) the one numbered 6:
For those "Yes" ones a new line is now below.
On the new lines (what appears at the rows numbered 5 and 7), it would be ideal if certain items from rows 4 and 6 could appear - the code and date - but type, Detail 1, Detail 2, Extra line needed and Amount £ would be blank, whilst the Code + description cells would contain the same drop down list as used by all other cells in that column.
The link to onedrive is https://lucasrossx-my.sharepoint.com/:x:/g/personal/kevin_lucas_lucasross_co_uk/ET7wr_VlDn9Jo-t8Zhhzxq4BP35KC0hyuB26qOIzN46wxg?e=tuaFXd
- HansVogelaarMar 15, 2023MVP
See the attached workbook. It is now a macro-enabled workbook (extension .xlsm), so you'll have to allow macros when you open it.
If you want to inspect the VBA code, right-click the sheet tab and select 'View Code' from the context menu.
- tryingtomakethingssimMar 15, 2023Copper ContributorThank you very much