4 CHOICES INTO ONE CELL
4 CHOICES INTO ONE CELL
(OP)
You can see that I am trying to fill a cell on another worksheet, but with this code, it always ends up blank because A145 is blank. How do I keep this from happening?
Range("A139").Copy Destination:=Sheets(1).Cells(279, 1)
Range("A141").Copy Destination:=Sheets(1).Cells(279, 1)
Range("A143").Copy Destination:=Sheets(1).Cells(279, 1)
Range("A145").Copy Destination:=Sheets(1).Cells(279, 1)
Range("A139").Copy Destination:=Sheets(1).Cells(279, 1)
Range("A141").Copy Destination:=Sheets(1).Cells(279, 1)
Range("A143").Copy Destination:=Sheets(1).Cells(279, 1)
Range("A145").Copy Destination:=Sheets(1).Cells(279, 1)





RE: 4 CHOICES INTO ONE CELL
RE: 4 CHOICES INTO ONE CELL
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: 4 CHOICES INTO ONE CELL
RE: 4 CHOICES INTO ONE CELL
For starters, if this is all you want to accomplish then there's no need for a macro. Just use the MAX() function of Excel. The formula in Sheet 1 Row 279 Column A would be
MAX('WhateverYourSourceSheetNameIs'!A139:A145)
If you really want to do this in code, then use the line
Sheets(1).Cells(279, 1).Value = Application.WorksheetFunction.Max(Range("A139:A145"))
Having Excel cut and paste through code is rarely the most efficient way to go.
RE: 4 CHOICES INTO ONE CELL