Patriot2879
Well-known Member
- Joined
- Feb 1, 2018
- Messages
- 1,227
- Office Version
- 2010
- Platform
- Windows
Hi Hope you can help and that this makes sense
Below is a snippet of code i am using for an email, what this code does is copy information in my work issue sheet and copies over into the email. But in my work issue sheet in columns N to V i have formulas that go all the way down for example to column 32, but this is not always filled with data found, for example it might only find data down to column 5, but the formula will still be below. I only want the below code to only copy the data found and not the blank cells with the formula as well. Is this possible and i hope you can help
Below is a snippet of code i am using for an email, what this code does is copy information in my work issue sheet and copies over into the email. But in my work issue sheet in columns N to V i have formulas that go all the way down for example to column 32, but this is not always filled with data found, for example it might only find data down to column 5, but the formula will still be below. I only want the below code to only copy the data found and not the blank cells with the formula as well. Is this possible and i hope you can help
Code:
LastRow = Sheets("Work Issue").Columns("N:V").Cells.Find(What:="*", SearchDirection:=xlPrevious, SearchOrder:=xlByRows).Row
Set rngDataToEmail = Sheets("Work Issue").Range("N1:V" & LastRow)