I have a macro that increase a cell number and one that decreases a cell number, heres my code:
t = Split(Worksheets("Sheet1").Range("d5").Text, "/")
t(0) = Format(t(0) + 1, "0")
Worksheets("Sheet1").Range("d5") = Join(t, "/")
So they do exactly what i want them to do but i want to put a limitation on them, so say the number in the cell is 0 then i dont want it to be able to subtract from it anymore, and say the number is 20 i dont want it to be able to add any more, i tried to put if statments into the code but no luck.
I need to be able to select a certain number (from, say, 1-20) from a drop down menu, which will decide a number of rows (filled with data) on the next sheet. As I prefer not to give anyone the sheet I'm actually working on I made a quick look-a-like which might explain this better.
A and B are different scenarios, with different values in the fake drop-down menu I made. Just to pass on the understanding of what I want the values to do. If putting a drop-down menu there is troublesome, then I can live without them. But entering a certain value in the field and getting that number of rows for a certain product is what I need. I tried searching for a function/macro to use for this, but I dont know what exactly to look for. Name, etc
I need a formula that can work out a percentage increase or decrease from cell J2 to L2.
J2 is the current data with L2 being the previous data - so the formula would compare J2 with L2 and tell me if there is an increase or decrease shown as a percentage.
The figures fluctuate from month to month so they could be either an increase or decrease. There are over 300 entries so I can't go through each one adjusting the formula accordingly - this is why I need the formula to do the working out if it is up or down.
I have a 49 numbers in cell A1:AW1 they are not in acceding order. I want to separate all groups start from lowest number to highest giving them deferent color. As shown in example table below in cell (A2 start with nš 6 and increase up to nš 47 till cell F2 =yellow color) then Cell (G3 decrease nš 3 and increase up to nš 49 till cell L49=Green Color) and continue same process for rest ....
I'm dealing with the following problem. Say I have a set af values:
A B 1 567 2 546 3 567 4 554 5 572 6 543
I can easily determine the average of the values in column B (=AVERAGE(B1:B6)) But I also want to know if the average is increasing or decreasing without making a chart and trendline. Concrete: I want the cell with average (say B7) to turn green when the trendline has a positive growth and red when negative.
in speeding up the below code as it does not seem to matter whether I use For, If loop etc - it runs too slowly. Basically we have one sheet which is input in a different timezone that needs converting to GMT... since daylight saving I wrote some code to cover the +/- 1 hour difference (this seems to work quite well) yet when it comes to converting the actual cells it runs incredibly slowly. I appreciate any help but its only the code after "Sheets("data").Unprotect" that i think needs changing. The time stamp is in column 7 - I hope this makes enough sense - which then gets converted by either 4.5 or 5.5 hours dependent on british summer time.
With Application .Calculation = xlCalculationAutomatic . ScreenUpdating = False .DisplayAlerts = False .EnableEvents = False End With
Dim FirstDate As Date Dim Position, DayIndex, lgrow, lstrow As Long, TargetMonth As Long, Stweekday, Enweekday, Tdate As Date, TargetYear As Long, cell As Range Dim bst As Boolean
I have totals in d18 and e18 and need to find the percentage increase or decrease between the 2. E18 is last year's value and D18 is this year's value. Which formula will give me what I am looking for:
I'm building a keypad out of commandbutton controls, and there's this strange resizing behavior with the commandbuttons. I've attached an example, as it's much easier to see than describe.... but essentially, clicking a button seems to enlargen it slightly, and then two clicks later, it 'dezooms' back to original size (even with shadows turned off). while this is not hugely noticeable individually, it feels really strange when there's a whole keypad of commandbuttons.
I am having difficulty finding information on coding my spin button on a user form. I searched and haven't found any information. I need to do is code a spin button to increase or decrease by 1 each time it is clicked up or down. I would like it to populate to a text box on my form if that is possible.
what i need is a macro to run when I print a form. I am making a job card with a unique number on it ie: 100. when I print the form, I then need the 100 to change to 101 and so on. I cant work this one out.
EDIT - Ive attached my work in progress. It is for a computer repair shop. I have a few macros in there as I need to email a copy of the workbook too.
when you open the workbook, you will see the job number in red. I just need a macro tht will increase that number +1 every time it runs. I also need the email macro to rename the workbook to the customer name input in cell B4 - but I think im best to post this request in a new thread?
I am trying to write a program that needs to select a different cell everytime it is ran. For example, this month when it runs I need it to select cell BL137. Next time it is ran it will need to select cell BL138. Month after BL139. The cell it selects will always be in the same column (column BL) and the cell number always increases by the same amount (1).
I have letter and number combination code in two collumns and they differ for 10.000 numbers:
BAM98314 BAM88314 BAM90000 BAM80000
As you can see the left code is for 10000 numbers higher. the letters are allways the same. In the event that this isn't so, if difference between codes in same row is more or less than 10000 numbers. I was thinking on making conditional formating so the cells with wrong difference would be marked red, but I do not know how to make formula for this difference.
I have multiple worksheets (too many, actually!) and each worksheet is a record. I need to enter a Record Number into B5 of each sheet. The Record Number doesn't start at 1. I'd like to enter a number into the first sheet and the rest of the sheets to increase by 1. However, I only need to do this to some sheets.
Is there a formula or maybe some VB code that can be used to decrease a cell value if another cell's value is changed. e.g. I have a userform that has a Textbox that will put a 6 digit number in cell J4 & a Combobox that enters a number in cell E4. If the value of J4 is changed from the Textbox, I would like to have cell E4's value decrease by 1. If J4 doesn't change, cell E4 remains unchanged.