LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Reduce a value by spliting the data

Hi
I'm trying to get a sheet to work, It resizes the row's depending on a
value in a range, but to prevent errors happening
I want to split the item by coping & posting the data and altering
the value. I've got this code to work but how do I get it to carry on
untill the values are below 40, currently it works for a value of 75

kev

Sub checksize()
Range("f4:J152").Select
For Each Item In Selection

If Item = 40 Then
With Item
Range("A" & Item.Row & ":" & "v" & Item.Row).Select
Item.Value = Item.Value - 35
Selection.Copy
Selection.Insert Shift:=xlDown
Item.Value = 35
MsgBox ("Item " & Item.Row - 3 & " ~ Is too big, it has
been split in sections!")
End With


End If



Next Item
End Sub
 
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
How do I reduce the columns outside my data? JFort Setting up and Configuration of Excel 2 September 15th 09 06:32 PM
Trying to either hide data in a cell or reduce the data to zero Dobbin0_4[_2_] Excel Worksheet Functions 2 February 9th 08 08:21 PM
Spliting data blander Excel Discussion (Misc queries) 4 July 26th 06 05:44 PM
help with spliting data cells pcavalcanto New Users to Excel 1 March 7th 06 03:24 AM
spliting a column of data into multiple columns CiceroCF Excel Discussion (Misc queries) 7 March 25th 05 12:40 AM


All times are GMT +1. The time now is 02:33 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"