# Search:

Type: Posts; User: Nelson78; Keyword(s):

Page 1 of 6 1

1. ## Thread: Sumif with VBA

by Nelson78
Replies
5
Views
149

### Re: Sumif with VBA

Yes, perfect.

Just one clarification: why Double?
2. ## Thread: Sumif with VBA

by Nelson78
Replies
5
Views
149

### Sumif with VBA

Hello everybody.

I'm running on empty with the following matter.

Writing this in a cell it works fine:

=SUMIF(H19:H1891,"black",G19:G1891)
3. ## Thread: Dictionaries and vba: when to use

by Nelson78
Replies
7
Views
153

### Re: Dictionaries and vba: when to use

Ok.

And applying the same concept, with this I can count how many times any single combination column A/column B occurs.

For Each Cl In Range("A2", Range("A" & Rows.Count).End(xlUp))
...
4. ## Thread: Dictionaries and vba: when to use

by Nelson78
Replies
7
Views
153

### Re: Dictionaries and vba: when to use

Thank's all for your contribuitions.

Dic(Cl.Value)(Cl.Offset(, 1).Value) = Dic(Cl.Value)(Cl.Offset(, 1).Value) + Cl.Offset(, 2).Value

I suppose this part
+ Cl.Offset(,...
5. ## Thread: Dictionaries and vba: when to use

by Nelson78
Replies
7
Views
153

### Dictionaries and vba: when to use

Hello everybody.

I've been studying some of the solutions found in mrexcel.com about dictionaries.
Having applied them "blindly" to my issues with success, I've decided to understand better their...
6. ## Thread: VBA: looping in an array and select the corresponding value

by Nelson78
Replies
15
Views
224

### Re: VBA: looping in an array and select the corresponding value

Well, now it works fine.

Thank's a lot.
7. ## Thread: VBA: looping in an array and select the corresponding value

by Nelson78
Replies
15
Views
224

### Re: VBA: looping in an array and select the corresponding value

Something is wrong.

Run Time Error '424' object required

in line

.Range("B1").Value = dicCount(.Range("A1").Value).count
8. ## Thread: VBA: looping in an array and select the corresponding value

by Nelson78
Replies
15
Views
224

### Re: VBA: looping in an array and select the corresponding value

sub count

Dim vData As Variant
Dim vOutput() As Variant
Dim vKey
Dim dicCount As Object
Dim dicTemp As Object
Dim i As Long, j As Long
9. ## Thread: VBA: looping in an array and select the corresponding value

by Nelson78
Replies
15
Views
224

### Re: VBA: looping in an array and select the corresponding value

By sight, la situation is like this.

https://imgur.com/HgV7pxM

Rows populated: about 10k
10. ## Thread: VBA: looping in an array and select the corresponding value

by Nelson78
Replies
15
Views
224

### Re: VBA: looping in an array and select the corresponding value

Ok.

Sheet "Sheet1" column K: I have a huge amount of rows with repeated and not repeated values, including 7210210 and 7210214.
Sheet "Sheet1" column D: same situation with repeated and not...
11. ## Thread: VBA: looping in an array and select the corresponding value

by Nelson78
Replies
15
Views
224

### Re: VBA: looping in an array and select the corresponding value

I know and I've been trying, but without much success.

https://imgur.com/RZsAlPu
12. ## Thread: VBA: looping in an array and select the corresponding value

by Nelson78
Replies
15
Views
224

### VBA: looping in an array and select the corresponding value

Hello everybody.

I've a situation as follows.

https://imgur.com/HLpoOUH

Then, in sheet "Data" I have two values:
cell A2 = 7210210
cell A3 = 7210214
13. ## Thread: Count unique values based on criteria in different column

by Nelson78
Replies
2
Views
115

### Re: Count unique values based on criteria in different column

I'm going to try.

Anyway, perhaps in VBA is easier.
14. ## Thread: Count unique values based on criteria in different column

by Nelson78
Replies
2
Views
115

### Count unique values based on criteria in different column

Hello.

I've in column D a lot of values with duplicates.

I've to count how many unique values in column D in relation to the value in column K same row.

For example: I need to know how many...
15. ## Thread: VBA: playing with arrays and dictionaries

by Nelson78
Replies
11
Views
283

### Re: VBA: playing with arrays and dictionaries

I'm adapting it to the real situation, and it seems to work fine.

But I'm bumping into a secondary problem: I've a button to trigger the macro in a different sheet that causes the following error:...
16. ## Thread: VBA: playing with arrays and dictionaries

by Nelson78
Replies
11
Views
283

### Re: VBA: playing with arrays and dictionaries

Maybe something like this:

Sub count()

Dim X, vRws
Dim objDict As Object
Dim lngRow As Long, lngLastRow

Set objDict = CreateObject("Scripting.Dictionary")
17. ## Thread: VBA: playing with arrays and dictionaries

by Nelson78
Replies
11
Views
283

### Re: VBA: playing with arrays and dictionaries

No, using the solutions you've proposed, the result is 4 (it considers duplicates).
I need 2 (no duplicates).
18. ## Thread: VBA: playing with arrays and dictionaries

by Nelson78
Replies
11
Views
283

### VBA: playing with arrays and dictionaries

Hello everybody.

I've a situation as follows:

https://imgur.com/6FS0Fqw

I need to calculate how many different cities (column H) have code 233 (column D) and list aaa (column K)

The...
19. ## Thread: Excel and Vba: using MSXML2.XMLHTTP to login into a website

by Nelson78
Replies
4
Views
760

### Re: Excel and Vba: using MSXML2.XMLHTTP to login into a website

Some new steps has been done.

I have extrapolated the following values and built, with them, the -very long - string
strPostData.

Here the values:

__VIEWSTATE
__LASTFOCUS
__EVENTARGUMENT
20. ## Thread: Excel and Vba: using MSXML2.XMLHTTP to login into a website

by Nelson78
Replies
4
Views
760

### Re: Excel and Vba: using MSXML2.XMLHTTP to login into a website

I could try answering myself: until the session is not expired (I think 10 minutes), the __EVENTVALIDATION keeps the same value.
21. ## Thread: Excel and Vba: using MSXML2.XMLHTTP to login into a website

by Nelson78
Replies
4
Views
760

### Re: Excel and Vba: using MSXML2.XMLHTTP to login into a website

Little by little, I'm going onward.

Scraping the parameters (__VIEWSTATE, __PREVIOUSPAGE, ...), all of them seem to have always the same value, except

__EVENTVALIDATION

I mean: if I...
22. ## Thread: String: how many characters could contain?

by Nelson78
Replies
3
Views
102

### String: how many characters could contain?

Hello everybody.

dim code as string

I have a string composed by 1474 characters.

When I define
23. ## Thread: VBA, Arrais and Dict: combine duplicate rows and sum the values

by Nelson78
Replies
8
Views
209

### Re: VBA, Arrais and Dict: combine duplicate rows and sum the values

Yes, the tests I've executed so far are ok.

Thank's.
24. ## Thread: VBA, Arrais and Dict: combine duplicate rows and sum the values

by Nelson78
Replies
8
Views
209

### Re: VBA, Arrais and Dict: combine duplicate rows and sum the values

Now the header is ok, but the first city of the list is missing.
25. ## Thread: VBA, Arrais and Dict: combine duplicate rows and sum the values

by Nelson78
Replies
8
Views
209

### Re: VBA, Arrais and Dict: combine duplicate rows and sum the values

Point 1 could be fixed with:

Range("B1").Resize(.Count, 17).Value = Application.Index(.Items, 0, 0)