ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   I know this is simple but ans= and nothing happens (https://www.excelbanter.com/excel-worksheet-functions/184999-i-know-simple-but-ans%3D-nothing-happens.html)

[email protected]

I know this is simple but ans= and nothing happens
 
I know this is something really simple that I am simply missing but I
have the brain cramps. Sorry.

Select Case ans
Case "7", "6", "5", "4", "3", "2"
ans = (O40)
Case 1
Sheets("DISTRICT ROLL-UP").Select
Range("O40").Select
ActiveCell.FormulaR1C1 = "7"
Sheets("DISTRICT ROLL-UP").Select
Range("B31:I34").Select
Selection.Copy
Sheets("DAILY").Select
Range("C137").Select
Selection.PasteSpecial Paste:=xlPasteValues,
Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Select

Cell O40 is 7 and nothing is happening. The data in cells B31;I34 is
not copying and pasting.

What am I missing?

Don

AKphidelt

I know this is simple but ans= and nothing happens
 
I would guess that you are putting quotes around numbers which are making
them text values.

Try using Case 7, 6, 5, 4, 3, 2 without the quotes

" wrote:

I know this is something really simple that I am simply missing but I
have the brain cramps. Sorry.

Select Case ans
Case "7", "6", "5", "4", "3", "2"
ans = (O40)
Case 1
Sheets("DISTRICT ROLL-UP").Select
Range("O40").Select
ActiveCell.FormulaR1C1 = "7"
Sheets("DISTRICT ROLL-UP").Select
Range("B31:I34").Select
Selection.Copy
Sheets("DAILY").Select
Range("C137").Select
Selection.PasteSpecial Paste:=xlPasteValues,
Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Select

Cell O40 is 7 and nothing is happening. The data in cells B31;I34 is
not copying and pasting.

What am I missing?

Don



All times are GMT +1. The time now is 06:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com