Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 1
Default Help with BVA code

Hi need a code that is going to work like this:
1will be use in a cell as data input
2 will affect another cell right next to it
3 will go blank after data is entered

Ex.... the cell will be used to enter sold items, the number of sold items will be substracted from an existing inventory count right next to it, but then I need the cell where the sold items number was entered to go blank again.....

I hope you understand my explanation, and if somebody can help me I will really apretiate it, thank you very much for reading my request...
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 852
Default Help with BVA code

On Monday, July 14, 2014 6:03:00 PM UTC-7, xxdesertorxx wrote:
Hi need a code that is going to work like this:

1will be use in a cell as data input

2 will affect another cell right next to it

3 will go blank after data is entered



Ex.... the cell will be used to enter sold items, the number of sold

items will be substracted from an existing inventory count right next to

it, but then I need the cell where the sold items number was entered to

go blank again.....



I hope you understand my explanation, and if somebody can help me I will

really apretiate it, thank you very much for reading my request...


xxdesertorxx



You could try something like this in the sheet module.

Where your inventory numbers are in column B and you enter the number of sold items in column A.

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A:A")) Is Nothing Then Exit Sub

Dim sItem As Long

sItem = Target
Target.Offset(, 1) = Target.Offset(, 1) - sItem
Target.ClearContents

End Sub


Regards,
Howard
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Help with BVA code

Thanks Howard - I also stole your macro as it is a great one that can become very usefull.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 852
Default Help with BVA code

On Tuesday, July 15, 2014 2:01:56 AM UTC-7, Johan Snyder wrote:
Thanks Howard - I also stole your macro as it is a great one that can become very usefull.


You are welcome.

Please don't call it stealing, if it were stealing I'd be in jail for felony theft, given all the snippets and codes I've used from this group!<g

Regards,
Howard
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Help with BVA code

Thanks Howard - I did a whole invoicing system in the year 2000 from snippets like these and I still have small businesses that run on that very same invoicing system.

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
Creating excel file, adding code to it from code, VBE window stays BlueWolverine Excel Programming 0 November 5th 09 07:55 PM
split post code (zip code) out of cell that includes full address Concord Excel Discussion (Misc queries) 4 October 15th 09 06:59 PM
How can I modify my code to offset the defined range and repeat theprocedure instead of duplicating my code? [email protected] Excel Programming 4 May 29th 09 10:13 PM
Run VBA code only worksheet change, but don't trigger worksheet_change event based on what the code does ker_01 Excel Programming 6 October 3rd 08 09:45 PM
Shorten code to apply to all sheets except a few, instead of individually naming them, and later adding to code. Corey Excel Programming 3 December 11th 06 05:14 AM


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

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"