If one has a group of textboxes, labels and command buttons in a certain layout and needs to duplicate that layout on the same userform a few times, is it okay for copy and paste to be used? Is there any harm in this method? I created a dummy test and placed a TextBox1 and TextBox2, CommandButton1, Label1 and Label2 on a userform, then copied and pasted all in one go on the same userform and got TextBox3, TextBox4, CommandButton2, Label3 and Label4, which was fair enough. I just wanted to know because this will save a lot of time instead of individually creating each control for the same layout pattern to be achieved.
↧
[SOLVED] Is it okay to copy and paste controls on the same userform?
↧
remove duplicated row and increase weight columns with vba
I'm trying to add a weight for source and target cell...so I do this :
then the result is like this :
But I didn't want to show the duplicates row (source and target) i want to remove the duplicate and increase the weight ...
like this :
any help for that ??
thanks
Code:
.Resize(, 4) = Array("Source", "Target", "Label", "Weight")
.........
Range(sStartingCellOutput).Offset(lRowOffset, lColOffset).Resize(1,4).Value = _
Array(sq(lUser_1, 2), sqq(lUser_2), rTopic.Value,1)
Code:
Source ,Target,Label,Weight
2955,7733,1,1
7733,2955,1,1
2961,6498,2,1
6498,2961,2,1
2961,2962,3,1
2961,2962,3,1
2962,2961,3,1
2962,2961,3,1
like this :
Code:
Source,Target,Label,Weight
2955,7733,1,1
7733,2955,1,1
2961,6498,2,1
6498,2961,2,1
2961,2962,3,2
2962,2961,3,2
any help for that ??
thanks
↧
↧
[SOLVED] Non Responding Excel Workbook VBA Code
I made a buggerup in my VBA code and now I can't open my workbook. It just hangs and if I click on it it comes up 'Not responding'.
Is there a way I can edit the VBA module without opening the workbook? I know where my problem is but I can't get to it to fix it:mad:
I declared a Sub without saying Private or Public:mad: When I closed my file I got an error message saying something was ambiquous with the declaration and instead of clicking Cancel I clicked Ok or vice versa. The file closed and now I can't open it again.
Help urgently needed please:eek:
Is there a way I can edit the VBA module without opening the workbook? I know where my problem is but I can't get to it to fix it:mad:
I declared a Sub without saying Private or Public:mad: When I closed my file I got an error message saying something was ambiquous with the declaration and instead of clicking Cancel I clicked Ok or vice versa. The file closed and now I can't open it again.
Help urgently needed please:eek:
↧
[SOLVED] Freeze (undeleteable) a default value in textbox but be able to add more text in that box
If one wants to have a textbox display a default value on initialize, one can simply type the value in the 'Text' field in the Properties tab for that textbox. The problem is that the text can be deleted by the user when the userform is initialized. Is there a way to use code to freeze the value in the textbox so the user cannot delete it? What is required however is for the user to add more text in that same textbox. Example, if one wants to freeze the text OPERATOR at that start of textbox so it cannot be deleted but allow the user to add more text in that box after the word OPERATOR, what is a good technique to use to achieve this?
↧
Wait until Refresh is done
Hi, I use ListObject.QueryTable property to get external data. Driver ODBC, BackgroundQuery = False.
I have some lines of code after QueryTable.Refresh, that are executed even the Query has not stopped running yet.
I'd like them to wait until the Refresh is done.
I tried to switch BackgroundQuery to True, Application.Wait, also a DoEvents method, but these don't do the trick.
I have some lines of code after QueryTable.Refresh, that are executed even the Query has not stopped running yet.
I'd like them to wait until the Refresh is done.
I tried to switch BackgroundQuery to True, Application.Wait, also a DoEvents method, but these don't do the trick.
↧
↧
[SOLVED] Deleting rows if one cell value is greater than the other.
I attached the file and a pic of the formatting.
Hi, new here. I have been playing with this macro for a week and am now in the final leg of my headache and need help. I came here because everyone seems so smart, quite impressive.
I have a work related macro that I need to delete rows if the value of the cells in column A is greater than the cells in column B. That's it.
The cells are formatted with HH:MM:SS AM/PM, but column A is actually the max allowed time of delivery and column B is the actual duration that took place. The file comes off of the server this way. I'm trying to filter for late deliveries and address them.
Capture.PNG
In this picture once the macro is working all of these rows would be deleted... there is thousands more in the attachment that need to be filtered through everyday.
Hi, new here. I have been playing with this macro for a week and am now in the final leg of my headache and need help. I came here because everyone seems so smart, quite impressive.
I have a work related macro that I need to delete rows if the value of the cells in column A is greater than the cells in column B. That's it.
The cells are formatted with HH:MM:SS AM/PM, but column A is actually the max allowed time of delivery and column B is the actual duration that took place. The file comes off of the server this way. I'm trying to filter for late deliveries and address them.
Capture.PNG
In this picture once the macro is working all of these rows would be deleted... there is thousands more in the attachment that need to be filtered through everyday.
↧
Run-Time Error 91 in code.
Hi All,
Having problems with some code. The aim is to copy a range and paste it into the corresponding Row in a table depending on a variable.
So, i have a cell on a worksheet which displays the current week we are in: i.e. a 'week commencing'.
At the end of a week, i want to submit final numbers (the range that is copied) and paste it into a table against the row which has the same date as my 'week commencing' so i can track numbers week on week.
I have included my code below. I had this working but then tried to combine it with another macro which is where it failed now i cannot recover it. I am getting OBJECT VARIABLE OR WITH BLOCK VARIABLE NOT SET - Run-Time error 91.
Any help is appreciated and like i say i am very much a beginner so anything that looks dumb in my code or can be improved, please feel free to call out!
Sub EndWeekCode()
Dim w_com As String
w_com = ThisWorkbook.Sheets("Results Page").Range("R11")
ThisWorkbook.Sheets("weekly results").Range("B15:J15").Copy
ThisWorkbook.Sheets("saves").Activate
Range("A5:P100").Find(w_com).Select
ActiveCell.Offset(0, 1).Select
ActiveCell.PasteSpecial xlPasteValues
ThisWorkbook.Sheets("Sat").Activate
[D3:D25].Value = 0
ThisWorkbook.Sheets("Mon").Activate
[D3:D25].Value = 0
ThisWorkbook.Sheets("Tuesday").Activate
[D3:D25].Value = 0
ThisWorkbook.Sheets("Wed").Activate
[D3:D25].Value = 0
ThisWorkbook.Sheets("results page").Activate
MsgBox ("Week Ended.")
End Sub
Having problems with some code. The aim is to copy a range and paste it into the corresponding Row in a table depending on a variable.
So, i have a cell on a worksheet which displays the current week we are in: i.e. a 'week commencing'.
At the end of a week, i want to submit final numbers (the range that is copied) and paste it into a table against the row which has the same date as my 'week commencing' so i can track numbers week on week.
I have included my code below. I had this working but then tried to combine it with another macro which is where it failed now i cannot recover it. I am getting OBJECT VARIABLE OR WITH BLOCK VARIABLE NOT SET - Run-Time error 91.
Any help is appreciated and like i say i am very much a beginner so anything that looks dumb in my code or can be improved, please feel free to call out!
Sub EndWeekCode()
Dim w_com As String
w_com = ThisWorkbook.Sheets("Results Page").Range("R11")
ThisWorkbook.Sheets("weekly results").Range("B15:J15").Copy
ThisWorkbook.Sheets("saves").Activate
Range("A5:P100").Find(w_com).Select
ActiveCell.Offset(0, 1).Select
ActiveCell.PasteSpecial xlPasteValues
ThisWorkbook.Sheets("Sat").Activate
[D3:D25].Value = 0
ThisWorkbook.Sheets("Mon").Activate
[D3:D25].Value = 0
ThisWorkbook.Sheets("Tuesday").Activate
[D3:D25].Value = 0
ThisWorkbook.Sheets("Wed").Activate
[D3:D25].Value = 0
ThisWorkbook.Sheets("results page").Activate
MsgBox ("Week Ended.")
End Sub
↧
Extract last price depending on recent date
Hello everyone
In my file, column Price (G) is the target column which I need to extract its value based on three conditions :
first, the item in cell K12 (column Item (E)) ...
second, deal with just Purchases in column Data(B) ...
third, deal with the most recent date ...
I have highlighted the expected results for each item
I prefer UDF function to deal with that thread
Thanks advanced for help
In my file, column Price (G) is the target column which I need to extract its value based on three conditions :
first, the item in cell K12 (column Item (E)) ...
second, deal with just Purchases in column Data(B) ...
third, deal with the most recent date ...
I have highlighted the expected results for each item
I prefer UDF function to deal with that thread
Thanks advanced for help
↧
[SOLVED] What is the listbox equivalent to SelectionMargin?
Turning SelectionMargin from True to False removes the indented space between the left edge of a textbox and where the text actually starts in that box. Is there a similar fix to remove that indent space in Listboxes? I cannot seem to see a SelectionMargin option in the Properties Window for listboxes.
↧
↧
code to paste the content of specific cells into the email generated by VBA
HI ALL,
i have wrote a vba to generate the an email from clinking on a command button it shows as below
Option Explicit
Private Sub CommandButton1_Click()
On Error GoTo ErrHandler
' SET Outlook APPLICATION OBJECT.
Dim objOutlook As Object
Set objOutlook = CreateObject("Outlook.Application")
' CREATE EMAIL OBJECT.
Dim objEmail As Object
Set objEmail = objOutlook.CreateItem(olMailItem)
With objEmail
.to = "webadmin@encodedna.com"
.Subject = "This is a test message from Arun Banik"
.Body = "Hi there"
.Display ' DISPLAY MESSAGE.
End With
' CLEAR.
Set objEmail = Nothing: Set objOutlook = Nothing
ErrHandler:
'
End sub
i just need a code to add the content of a specific number of cells into the body of the email, please help.
thanx
garfen
i have wrote a vba to generate the an email from clinking on a command button it shows as below
Option Explicit
Private Sub CommandButton1_Click()
On Error GoTo ErrHandler
' SET Outlook APPLICATION OBJECT.
Dim objOutlook As Object
Set objOutlook = CreateObject("Outlook.Application")
' CREATE EMAIL OBJECT.
Dim objEmail As Object
Set objEmail = objOutlook.CreateItem(olMailItem)
With objEmail
.to = "webadmin@encodedna.com"
.Subject = "This is a test message from Arun Banik"
.Body = "Hi there"
.Display ' DISPLAY MESSAGE.
End With
' CLEAR.
Set objEmail = Nothing: Set objOutlook = Nothing
ErrHandler:
'
End sub
i just need a code to add the content of a specific number of cells into the body of the email, please help.
thanx
garfen
↧
.Find not working with xlValues
Hey Guys,
I'm trying to find the first and last occurrence of a date in a column.
If the dates are entered as text (ie. 12/10/15), the code below works using LookIn:=xlFormulas, but doesn't using LookIn:=xlValues
When the dates are entered via formula (the way I want it to be done), then neither xlFormulas or xlValues doesn't work.
It makes sense that when all the dates are generated via formula that the xlFormulas wouldn't match the SetDate date, but I'm unsure why xlValues doesn't work.
I'm trying to find the first and last occurrence of a date in a column.
If the dates are entered as text (ie. 12/10/15), the code below works using LookIn:=xlFormulas, but doesn't using LookIn:=xlValues
When the dates are entered via formula (the way I want it to be done), then neither xlFormulas or xlValues doesn't work.
It makes sense that when all the dates are generated via formula that the xlFormulas wouldn't match the SetDate date, but I'm unsure why xlValues doesn't work.
Code:
Sub Button1_Click()
ProfitRow = 3
Dim SetDate As Date
SetDate = Sheet11.Cells(20, 9)
FindDate = 0
Do While FindDate = 0
If Sheet11.Cells(ProfitRow, 1) = SetDate Then
FindDate = 1
Else
ProfitRow = ProfitRow + 1
FindDate = 0
End If
Loop
'MsgBox (ProfitRow)
'Set Cash, Rewards, CC Rewards, Sean (before returns)
Dim SalesRowFirst As Integer
Dim SalesRowLast As Integer
If Sheet5.Cells(3, 16) = 0 Then
SalesRowFirst = 0
SalesRowLast = 0
GoTo the_skip1:
End If
On Error GoTo ErrorHandler5
SalesRowFirst = Sheet1.Columns(1).Find(What:=SetDate, LookIn:=xlFormulas, LookAt:=xlWhole, SearchDirection:=xlNext, MatchCase:=False).Row
SalesRowLast = Sheet1.Columns(1).Find(What:=SetDate, LookIn:=xlFormulas, LookAt:=xlWhole, SearchDirection:=xlPrevious, MatchCase:=False).Row
GoTo the_salesrowfound:
ErrorHandler5:
SalesRowFirst = 0
SalesRowLast = 0
the_salesrowfound:
i = SalesRowFirst
...more code....
End Sub
↧
Call VBA function with range objects and change multiple cells
Dear all,
this is my first post, hope its not getting to humble. I am trying to write a VBA excel function with which I can split a string located in a user defined cell. The result of this splitting process are many substrings, which I would like to have stacked under a cell which can also be selected by the user. Example: String : "A|B|C" in Cell A3. With B3 =Splitter(A3;C3) I want to get the result in the cells like this: C3="A"; C4="B"; C5="C". It should even work across different worksheets (but all in one workbook).
This is how I would like to approach this, but cannot generate the core code, only drafted the functionality I would hope to get (see 'line with <---).
Help would be very much appreciated
Best,
Dan
this is my first post, hope its not getting to humble. I am trying to write a VBA excel function with which I can split a string located in a user defined cell. The result of this splitting process are many substrings, which I would like to have stacked under a cell which can also be selected by the user. Example: String : "A|B|C" in Cell A3. With B3 =Splitter(A3;C3) I want to get the result in the cells like this: C3="A"; C4="B"; C5="C". It should even work across different worksheets (but all in one workbook).
This is how I would like to approach this, but cannot generate the core code, only drafted the functionality I would hope to get (see 'line with <---).
Code:
Public Function Splitter(SourceCell As Range, TargetTopCell As Range) As Integer
'take a source string from a worksheet. Split it and stack the parts of the result under a TargetCell
Dim SParts() As String
Dim i, nParts As Integer
SParts() = Split(SourceCell, "|") 'split String when "|" appears in the string.
nParts = UBound(SParts()) 'array size of the result of split
For i = 0 To nParts
'TargetTopCell.Offset.Row(i) = SParts(i) '<--- would like to have here the SParts written in individual rows below TartgetTopCell
MsgBox (SParts(i)) 'control, that the split functions works in general
Next i
Splitter = nParts + 1 'Return: in how many parts was the string split
End Function
Best,
Dan
↧
[SOLVED] VBA to execute on value change of any of 4 cells
I'm trying to run a macro when any of 4 cells change values. The macro pulls the current price of SPY from the Yahoo Finance API. I've been able to get the logic to work when there is only one cell being checked for a value change. However, I can't seem to get the second macro (which looks for a calue change to any of 4 cells) to work.
Oddly, it does not seem to generate an error messge either.
Can anyone help me figure this out?
This one works
This one, code saved to the same module as the first, does not work and generates no error message.
Thanks in advance for helping a VBA newbie.
Oddly, it does not seem to generate an error messge either.
Can anyone help me figure this out?
This one works
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Target.Worksheet.Range("C32")) Is Nothing Then
Dim W As Worksheet: Set W = ActiveSheet
Symbol = "SPY"
Dim strURL As String, strCSV As Double
strURL = "http://download.finance.yahoo.com/d/quotes.csv?s=" & Symbol & "&f=l1"
Set Http = CreateObject("MSXML2.XMLHTTP")
Http.Open "GET", strURL, False
Http.Send
strCSV = Http.responseText
W.Range("P" & "45").Value = strCSV
Set Http = Nothing
End If
End Sub
Code:
Private Sub Worksheet_Change2(ByVal Target2 As Range)
If Not Intersect(Target2, Target2.Worksheet.Range("C37:C40")) Is Nothing Then
Dim W As Worksheet: Set W = ActiveSheet
Symbol = "SPY"
Dim strURL As String, strCSV As Double
strURL = "http://download.finance.yahoo.com/d/quotes.csv?s=" & Symbol & "&f=l1"
Set Http = CreateObject("MSXML2.XMLHTTP")
Http.Open "GET", strURL, False
Http.Send
strCSV = Http.responseText
W.Range("P" & "47").Value = strCSV
Set Http = Nothing
End If
End Sub
↧
↧
PasteSpecial Format to two decmo only
I'm trying to format the numbers that get copied/pasted to two decmo-places only
For example I want to get $1,272.69 but instead, I get 1272.69345238095
For example I want to get $1,272.69 but instead, I get 1272.69345238095
Code:
.Copy
Sheets("DATA").Cells(Rows.Count, "J").End(xlUp).Offset(1, 8).PasteSpecial xlPasteValues
↧
Capturing of date and time whenever a long list of 1 changes to 0 and vice versa
Hi, everyone....I'm getting a series of 1 and 0 (raw data) together with their date and time on the neighboring column. Basically, I'd like to capture the date and time whenever the long list of 1 changes to 0 or from 0 to 1. Could someone please enlighten me on this matter? Thanks!
↧
Please edit the recorded macro!
Hello members,
Merry Christmas and Happy New Year!
This macro helps me to VLOOKUP between multiple sheets based on Date column (works only for the first column). However, I have to change the sheets' name each time, and apply to the rest of the data in each column by clicking on + manually. Could you please edit the macro to do it automatically for the whole range of dataset?
Thank you for the time.
Merry Christmas and Happy New Year!
This macro helps me to VLOOKUP between multiple sheets based on Date column (works only for the first column). However, I have to change the sheets' name each time, and apply to the rest of the data in each column by clicking on + manually. Could you please edit the macro to do it automatically for the whole range of dataset?
Thank you for the time.
Code:
Sub VLOOKUPmanual()
'
'vlookup between multiple sheets
'change the sheets' name
Range("C2").Select
ActiveCell.FormulaR1C1 = _
"=IFERROR(VLOOKUP(RC[-2],'1541137'!C[-2]:C[-1],2,0),"""")"
Range("D2").Select
ActiveCell.FormulaR1C1 = _
"=IFERROR(VLOOKUP(RC[-3],'1540135'!C[-3]:C[-2],2,0),"""")"
Range("E2").Select
ActiveCell.FormulaR1C1 = _
"=IFERROR(VLOOKUP(RC[-4],'1539134'!C[-4]:C[-3],2,0),"""")"
Range("F2").Select
ActiveCell.FormulaR1C1 = _
"=IFERROR(VLOOKUP(RC[-5],'1539001'!C[-5]:C[-4],2,0),"""")"
Range("G2").Select
ActiveCell.FormulaR1C1 = _
"=IFERROR(VLOOKUP(RC[-6],'1538117'!C[-6]:C[-5],2,0),"""")"
End Sub
↧
Why excel remember last excel window size?!!!
Hi beautiful people,
1- Open new excel file by going Start > Microsoft Excel. (See that Excel window size is normal)
2- Run following code. (After running following code see that your Excel window located middle of your screen)
3- Close that excel file without saving.
4- Open new excel file by going Start > Microsoft Excel.
Question: Why excel remember last opened excel window size?!!!
Any idea to solve this?
1- Open new excel file by going Start > Microsoft Excel. (See that Excel window size is normal)
2- Run following code. (After running following code see that your Excel window located middle of your screen)
Code:
Sub SetWindowSize1()
Application.WindowState = xlNormal
Application.Top = 300
Application.Left = 300
Application.Width = 50
Application.Height = 50
End Sub
4- Open new excel file by going Start > Microsoft Excel.
Question: Why excel remember last opened excel window size?!!!
Any idea to solve this?
↧
↧
Calculating average counting last positive n records
Hello,
I'm not required to solve this problem, but if I do, it would have a lot of weight at my company. Below is some code (I didn't write), but it calculated average pay based on 26 pay periods. Until recently, the column that had the values did not include 0 amounts. As the clients demands have changed, and the writer of the code is no longer at the company, the code itself has issues in that it doesn't account for any 0 values. Maybe you can help, maybe it's too much for a first time user to post. I had to try. So here's some code behind a button....
I know I should have put this in a specific format but I couldn't remember the html syntax. Apologies.
So, the code as it is, if I understand it correctly, grabs the last 26 entries of a particular column and calculates the average, then multiplies it by .40 or .50. If, in the last 26 entries, a 0 amount appears, the calculation is incorrect because it continues to divide by 26. In terms of counting the fields, each 0 should reduce the count by 1. So for example, if the last 26 entries contain 6 0's, the sum of the 26 entries should be divided by 20 for the calculated average. The problem with the code then, is the diviser is not adjusting to the change when 0's are present.
I know I'm asking a lot for my level of knowledge, because I'm basically asking someone to edit the code for me. And further, as I look at this code, only parts are understandable to me at this time. If no help is available, I'll be the first to understand. No hard feelings.
Lewis
PS I'm looking for tutorials from Beginner to Expert. Any references would be greatly appreciated.
I'm not required to solve this problem, but if I do, it would have a lot of weight at my company. Below is some code (I didn't write), but it calculated average pay based on 26 pay periods. Until recently, the column that had the values did not include 0 amounts. As the clients demands have changed, and the writer of the code is no longer at the company, the code itself has issues in that it doesn't account for any 0 values. Maybe you can help, maybe it's too much for a first time user to post. I had to try. So here's some code behind a button....
Code:
Private Sub CalculateButton_Click()
Call DeleteDups
Dim Wb As Workbook
Dim Ws As Worksheet
Dim Rng2 As Range
Dim LDWlocation As String
Dim LastPay As Date
Dim GrossPay As String
Dim PayAvg As String
Dim PayBen As String
Dim LDW As Date
Dim BenSts As String
Dim JurisNote As String
Set Wb = ActiveWorkbook
Set Ws = Wb.ActiveSheet
If CheckPayForm.HourlyOption.Value = True Then
BenSts = 0.5
Else
BenSts = 0.6
End If
Ws.Range("B1").Formula = " "
Ws.Range("B2").Formula = " "
LDW = CheckPayForm.LDWTextBox.Value
Ws.Range("X1").Formula = LDW
Ws.Range("Z1").Formula = "=INDEX($B$7:$B$999999, MATCH(X1,$B$7:$B$999999, 1))"
If Ws.Range("Z1").Value = Ws.Range("X1").Value Then
LDW = LDW - 1
Ws.Range("X1").Formula = LDW
End If
LastPay = Ws.Cells(1, "Z").Value
Ws.Range("X1").Formula = " "
Ws.Cells.Find(LastPay, , xlFormulas).Activate
Set Rng2 = Range(ActiveCell.Offset(0, 1), ActiveCell.Offset(-25, 1))
LDWlocation = ActiveCell.Address(False, False, xlR1C1, RelativeTo = ActiveCell.Cells(, 2))
GrossPay = Excel.WorksheetFunction.Sum(Rng2)
PayAvg = Excel.WorksheetFunction.Average(Rng2)
PayBen = Excel.WorksheetFunction.Product(PayAvg, BenSts)
PayBen = Application.Round(PayBen, 2)
CheckPayOutput.GrossOutput.Caption = GrossPay
CheckPayOutput.AverageOutput.Caption = PayAvg
CheckPayOutput.BenefitOutput.Caption = PayBen
JurisNote = "26 weeks gross pay = " & GrossPay & " " & GrossPay & " / 26 = " & PayAvg & " " & PayAvg & " x " & BenSts & " = $" & PayBen & " " & "Matches Juris Y/N? "
Set MSForms_DataObject = CreateObject("new:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}")
MSForms_DataObject.SetText JurisNote
MSForms_DataObject.PutInClipboard
Set MSForms_DataObject = Nothing
CheckPayForm.Hide
CheckPayOutput.Show
So, the code as it is, if I understand it correctly, grabs the last 26 entries of a particular column and calculates the average, then multiplies it by .40 or .50. If, in the last 26 entries, a 0 amount appears, the calculation is incorrect because it continues to divide by 26. In terms of counting the fields, each 0 should reduce the count by 1. So for example, if the last 26 entries contain 6 0's, the sum of the 26 entries should be divided by 20 for the calculated average. The problem with the code then, is the diviser is not adjusting to the change when 0's are present.
I know I'm asking a lot for my level of knowledge, because I'm basically asking someone to edit the code for me. And further, as I look at this code, only parts are understandable to me at this time. If no help is available, I'll be the first to understand. No hard feelings.
Lewis
PS I'm looking for tutorials from Beginner to Expert. Any references would be greatly appreciated.
↧
Coloring cells based on random number values within a column.
Hello again. I'm back because you people are awesome.
I attached the file I need help with along with a picture below
What I need to do is assign a different color for every different random value, but say I don't know how many values I have in total... and also could be any number value. So Since I don't know how many different values I have in the column I would like excel to figure it out and assign a random color for each value found accordingly.
Say there's 20 #11 that would be green while 45 the #33 would be blue and on and on and on... and every time I ran the macro the colors would be different each time but coloring similar values the same color in an effort to make it easy to see. (I already have the code for sorting smallest to biggest)
Capture.PNG
colors.xlsm
I attached the file I need help with along with a picture below
What I need to do is assign a different color for every different random value, but say I don't know how many values I have in total... and also could be any number value. So Since I don't know how many different values I have in the column I would like excel to figure it out and assign a random color for each value found accordingly.
Say there's 20 #11 that would be green while 45 the #33 would be blue and on and on and on... and every time I ran the macro the colors would be different each time but coloring similar values the same color in an effort to make it easy to see. (I already have the code for sorting smallest to biggest)
Capture.PNG
colors.xlsm
↧
find date, copy refering to the heders and one condition(in last row)
Hi All,
I'm stock in this and I'd like to ask for help from experts.
Copy data refering to the date.
I'd like to update File_1 every day with a data from yesterday.
I'm trying to do something like "slide table".
I'd like to copy data by date from one workbook(BASE) to workbook (FILE_1).
(from A do B).
*In FILE_1 (DAY is on row 3) Headers (on row 5)
**Each range for day is on the same size.
*** DATE is on first column in a range
*** BLUE color - cells to paste data form BASE
*** YELLOW color - cells with data. Not to replacing each cell with data.
but Empty cells I need to replace from BASE.
For every cells on range (yesterday date in FILE_1 i A1)
copy/paste and replace any data if something on there.
Only in Row CONDITION - replecing only empty cells.
Thanks in advance.
I'm stock in this and I'd like to ask for help from experts.
Copy data refering to the date.
I'd like to update File_1 every day with a data from yesterday.
I'm trying to do something like "slide table".
I'd like to copy data by date from one workbook(BASE) to workbook (FILE_1).
(from A do B).
*In FILE_1 (DAY is on row 3) Headers (on row 5)
**Each range for day is on the same size.
*** DATE is on first column in a range
*** BLUE color - cells to paste data form BASE
*** YELLOW color - cells with data. Not to replacing each cell with data.
but Empty cells I need to replace from BASE.
For every cells on range (yesterday date in FILE_1 i A1)
copy/paste and replace any data if something on there.
Only in Row CONDITION - replecing only empty cells.
Thanks in advance.
↧