Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calculations Return by SQL
Hi All,
Is it possible to return a custom calculation from SQL into a cell and make it work? For example, I have columns A, B, C, D. I will return values for A,B,and C, but for D I will return =A1+B1. A B C D 1 2 3 3 2 2 8 4 In another scenario, D may be B + C A B C D 1 2 3 5 2 2 8 10 I would like to make this dynamic enough where I would have to only change the SQL vs changing the Excel Spreadsheet (distributing new one everytime a calculation is changed). Right now, it returns the following: A B C D 1 2 3 =A1+B1 2 2 8 =A2+B2 The strange thing is that when I go into the cell, hit F2, then enter it correctly calculates. I have tried using Application.CalculateFull in VBA and also Ctrl + Alt + F9 in the worksheet itself, but both methods don't seem to work. TIA |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Return date if in range, else return blank | Excel Worksheet Functions | |||
Compare Value in Cell 1 to a List, Return Value if Match otherwise Return Null | Excel Discussion (Misc queries) | |||
LOOKUP and return the column heading for IF/THEN return for False | Excel Discussion (Misc queries) | |||
check if reference exists, then return its value or return 0 | Excel Worksheet Functions | |||
VBA Syntax for VLOOKUP to return array of return values | Excel Programming |