Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default If statements in Excel

Hi to all

Is there anyway of write a VBA script for a cell that says If for example on
sheet3 what ever b2 has in it add to b2 in sheet1 or or what ever is in
sheet3 B1 subtract ii from b2 on sheet1


I have tried and failed it is driving me barmey
--
N/A
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default If statements in Excel


With Worksheets("Sheet1").Range("B2")
.Value = .Value + Worksheets("Sheet2").Range("B2").Value - _
Worksheets("Sheet2").Range("B1").Value
End With


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Joel" wrote in message
...
Hi to all

Is there anyway of write a VBA script for a cell that says If for example
on
sheet3 what ever b2 has in it add to b2 in sheet1 or or what ever is in
sheet3 B1 subtract ii from b2 on sheet1


I have tried and failed it is driving me barmey
--
N/A



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default If statements in Excel

Hi bob thanks for your help very muchy appreicated but I have confused myesel
further, maybe I can explain myself better

I have 2 sheets in my spreadsheet

Sheet 1 is called Template
Sheet 2 is called Calculation

In the Template sheet I have 2 cells of great interest "R29 Amount in"

"T29 Amount Out"


In the Calculations Sheet I have a 4 columns which perform various fuctions
and calculations

Column 1 (Full amount minus amount paid) This takes a copy of my balance
from my template sheet and adds the amount in I have paid in

Formula is =IF(Template!R29="","",(J6-Template!R29))

Column 2 (Full amount plus amount used) This takes a copy of my balance from
my template sheet and subtracts the amount in I have paid out

Formula is =IF(Template!T29="","",(J6+Template!T29))

Column 3 (Amount of monthly interest) This take a copy of my balance and
adds my monthly interest to it

Formula is =IF(D7="","",(D7*Template!T14))


Column 4 (Carried forward Balance) This is the cell I am havin great
problems with I can get it to subtract what I have paid off but I am having
problems to get it to add what I have used on it

The Formula is =IF(D7="","",(D7+H7))

In essence I am wanting it t do 2 calculations at once I want it to continue
to deduct but I now want it to add whatever I use that is why I thought VBA
woul be better but I am just stuck can you please help.

Regards Joel







--
N/A


"Bob Phillips" wrote:


With Worksheets("Sheet1").Range("B2")
.Value = .Value + Worksheets("Sheet2").Range("B2").Value - _
Worksheets("Sheet2").Range("B1").Value
End With


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)


"Joel" wrote in message
...
Hi to all

Is there anyway of write a VBA script for a cell that says If for example
on
sheet3 what ever b2 has in it add to b2 in sheet1 or or what ever is in
sheet3 B1 subtract ii from b2 on sheet1


I have tried and failed it is driving me barmey
--
N/A




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
If\then statements in Excel [email protected] Excel Worksheet Functions 1 October 24th 07 07:10 PM
IF Statements (Mutliple Statements) Deezel Excel Worksheet Functions 3 October 19th 06 06:13 AM
Excel - Any Help On If Statements BONJOVI2005 Excel Discussion (Misc queries) 2 December 12th 05 10:04 AM
Excel If Statements, please help! izzie Excel Worksheet Functions 4 December 8th 05 08:36 PM
Excel Help with IF statements alexm999 Excel Discussion (Misc queries) 1 July 26th 05 08:54 PM


All times are GMT +1. The time now is 11:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"