Hi Abdul,
I inserted the code into a new module so that cant be the problem..
I defined the relevant cells (a1 and b1) as numbers. I tried it again and get the following error. Anysuggestion based on this?
Dear all,
I created a new module in which in inserted the following code:
Function Discount(quantity, price)
If quantity >= 100 Then
Discount = quantity * price * 0.1
Else
Discount = 0
End If
Discount = Application.Round(Discount, 2)
End Function
But now when...
Thanks Dan, made a mistake though. What I meant:
- if the first number is <> "0" it should perform left(A1;6)
- if the first number is "0" it should perform left(A1;5)
- if the first number is "00" it should perform left(A1;4)
So after
Case Else
sResult = Left(c2, 5)
I should include some...
Dear all,
I'm looking for a VBA code which can perform the following:
Scroll through some digits and
- if the first number is <> "0" it should perform left(A1;6)
- if the first number is "0" it should perform left(A1;5)
- if the first number is "0" it should perform left(A1;4)
Anybody some...
Dear all,
I often need two excel files. Therefore I often place them together in minimized screens (like fe in attachment).
I was wandering is there a view to save this? So I can click a link and them the two excel files pop in the size I save them?
Dear regards,
Marc
Dear all,
I have the following situation:
I created a link from a cell in tab1 to a cell in tab2. No I would like to include that, dependent on how I enter the information in tab1, the information shows in the cell in tab 2.
So if I enter 7% it should give 7% and when I enter 23,23 it...
Dear all,
I have the following problem: I want to create an excel function/vba script which can do the following:
According to two number in two cell it should produce a colour. So fe: if e1 = 2 and g1 = 3 in want "yellow" in cell j1. I tried to do this with a nested if fuction but this is...
Dear all,
I've created an excel file in which I use an advanced filter option. The filter works fine. Only problem is that does not copy the formulas within the cells.
So if the source value has a value of 3 which i composed of B3 and C3 I get "3" but cell does not contain any formulas...
Dear all,
I want to create on macro which runs the folling two macro's:
1. first filter macro:
Sub FILTER_VISIE()
Sheets("Visie uitlijnen").Range("B3:r16").AdvancedFilter Action:= _
xlFilterCopy, CriteriaRange:=Range("B1:R2"), CopyToRange:=Range("C4:R4"), _
Unique:=False
End Sub
2. second filter...
Thanks for your feedback Mark L. But it still doesn't work when I enter the code like:
Sub FILTER_VISIE()
With ActiveWorkbook.Worksheets("Visie uitlijnen").Range("B3:r16").AdvancedFilter Action:= _
xlFilterCopy, CriteriaRange:=Range("B1:R2"), CopyToRange:=Range("C4:R4"), _
Unique:=False...
Dear all,
I want to create on macro which runs the folling two macro's:
1. first filter macro:
Sub FILTER_VISIE()
Sheets("Visie uitlijnen").Range("B3:r16").AdvancedFilter Action:= _
xlFilterCopy, CriteriaRange:=Range("B1:R2"), CopyToRange:=Range("C4:R4"), _
Unique:=False
End Sub
2...
Dear all,
I'm trying to run a macro but get an error. When i'm looking into the code I get this:
Sub Pic_PrintData_Click()
Dim iCounter As Integer
For iCounter = 0 To sht_Temp.Range("A65535").End(xlUp).Row - 2
Call fn_Filter(Sheets(sht_Temp.Range("A2").Offset(iCounter...
Dear all,
I've created a VBA script which allows me to save a file with time and datestamp. I however would also like to create something through which I can save an excel file to a particular map on my desktop.
So I could just press a macro and then the xls file will be saved in map "Excel...
Dear all,
I have an excel sheet which i based like this:
Name: John; Josh; Grace
Activity 1 : 10%
Activity 2 : 20%
Activity 3: 20%
Activity 4: 10%
I would no like to create a VBA code which can show the name with the relevant activities. Kinda like:
John...
Dear Luke,
Thanks for your reply.
I tried and it works with text fields. It does however not work when I want to copy a range. If I want to copy a range in an excel sheet and I want to sent this by mail i wanted to use the following code:
Sub Test1()
'
' Test1 Macro
' Macro recorded...
Dear all,
I've written the following VBA text which allows me to send part of an excel file automatically by email:
Sub Send_Range()
ActiveSheet.Range("A1:B5").Select
ActiveWorkbook.EnvelopeVisible = True
With ActiveSheet.MailEnvelope
.Introduction = "Dit is een voorbeeldwerkblad."...
Sorry for being unclear.
Anyway, the last name is "Peet". So i'm looking for a VBA script /excel tool which does something like looking at the total name (Marc van der Peet) and then producing the last word ("Peet") in the next column.
And because i have 20000 names for i have to do this i...
Hmm, all the tabs in my post do not work. I mean:
Through text to column I can get this:
Marc <next colum> van <next colum> der <next colum> Peet
Jonas <next colum> Jansen
Piet <next colum> Van <next colum> Straten
But i'm looking for a...
Ok I'll provide some examples:
I have this
Name
Marc van der Peet
Jonas Jansen
Piet van Straten
Through text to column I can get this:
Marc van der Peet
Jonas Jansen
Piet Van Straten
But i'm looking for a way to get all the last names into one column. Does this make it...