Public Sub FitPic()
On Error GoTo NOT_SHAPE
Dim PicWtoHRatio As Single
Dim CellWtoHRatio As Single
With Selection
PicWtoHRatio = .Width / .Height
End With
With Selection.TopLeftCell
CellWtoHRatio = .Width / .RowHeight
End With
Select Case PicWtoHRatio / CellWtoHRatio
Case Is > 1
With Selection
.Width = .TopLeftCell.Width
.Height = .Width / PicWtoHRatio
End With
Case Else
With Selection
.Height = .TopLeftCell.RowHeight
.Width = .Height * PicWtoHRatio
End With
End Select
With Selection
.Top = .TopLeftCell.Top
.Left = .TopLeftCell.Left
End With
Exit Sub
NOT_SHAPE:
MsgBox "Select a picture before running this macro."
End Sub
-17% ₹99,999 M.R.P.: ₹1,19,999 EMI starts at ₹4,848. No Cost EMI available About this item Leica 50MP Quad cameras capture every moment in great detail. LYT 900 1inch image sensor with stepless f/1.63 - f/4.0 variable aperture. Leica Dual telephoto cameras giving freedom of multiple focal lengths. Xiaomi 14 Ultra records 8K video on all the cameras along along Dolby Vision for a professional cinematography experience. The high resolution 32MP front camera comes with smart FoV switching and records videos upto 4K 60fps The 6.73 inch WQHD+ 120Hz LTPO AMOLED display with a peak brightness of 3000nits meets the most demanding needs and provides the best viewing experience. The display reproduces 68 Billion+ colours . It is protected by Xiaomi Shield Glass. Xiaomi 14 boots with Xiaomi's HyperOS out of the box. HyperOS is based on Android 14 The flagship Snapdragon 8 Gen 3, 4nm processor is designed to provide groundbreaking performance. The processor is coupled with fast UFS 4.0 Stora...