testarossa933
New Member
- Joined
- Apr 6, 2021
- Messages
- 1
- Office Version
- 365
- Platform
- Windows
Greetings,
My filtered table is as follows, with conditional formatting to highlight cells that show value below 40:
I would like to email this filtered table, either as PDF or in the body of the email with formatting preserved if possible, going through a loop in a slicer which filters the employees results. What would be the best way to achieve this?
I have the slicer loop figured out with the following code:
Thanks.
My filtered table is as follows, with conditional formatting to highlight cells that show value below 40:
Employee | First Name | EmailAddress | 02-Jan | 09-Jan | 16-Jan | 23-Jan | 30-Jan | 06-Feb | 13-Feb | 20-Feb | 27-Feb | 06-Mar | 13-Mar | 20-Mar | 27-Mar | 02-Apr |
Test Name | Test | test@name.com | 40.00 | 40.00 | 40.00 | 40.00 | 41.00 | 40.00 | 40.00 | 40.00 | 40.00 | 40.00 | 0.00 | 0.00 | 0.00 | 0.00 |
I would like to email this filtered table, either as PDF or in the body of the email with formatting preserved if possible, going through a loop in a slicer which filters the employees results. What would be the best way to achieve this?
I have the slicer loop figured out with the following code:
VBA Code:
Set SC = ActiveWorkbook.SlicerCaches("Slicer_Employee") 'Add slicer name between " "
Set SL = SC.SlicerCacheLevels(1)
'c(ounter) is set to 1, ready to begin
C = 1
'Repeat the a loop until number of prints exceeds number of items in slicer
Do While C <= SC.SlicerCacheLevels.Item.Count + 1
'This makes sure that SI is the correct slicer. Needed for correct file name.
For Each SI In SL.SlicerItems
If SI.Selected = True Then
SlicerverdiIndex = C
Exit For
End If
Next SI
Thanks.